Closed Bug 1500241 Opened 4 years ago Closed 4 years ago

[Clang-Tidy] Disable 'readability-implicit-bool-conversion' check

Categories

(Developer Infrastructure :: Source Code Analysis, enhancement)

enhancement
Not set
normal

Tracking

(firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: jorendorff, Assigned: andi)

References

Details

Attachments

(1 file)

I personally like this rule, but our coding style is the opposite:

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#CC_practices

> When testing a pointer, use `(!myPtr)` or `(myPtr)`;
> don't use `myPtr != nullptr` or `myPtr == nullptr`.

...so the warnings are just noise.
Oh, I guess this check enforces multiple rules, some of which we want to keep. Hmm.

Here's an example of an incorrect report:
  https://phabricator.services.mozilla.com/D8887#209668
See Also: → 1478840
<marco> ah this bug again
<marco> I think we've disabled it
<jorendorff> oh cool
<marco> jorendorff: if you rebase on top of latest mozilla-central you should not see it reported anymore
Flags: needinfo?(jorendorff)
Assignee: nobody → bpostelnicu
Jason I did an 'arc patch D8887' and indeed in that revision we don't have the mitigation flags for 'readability-implicit-bool-conversion' could you please rebase your patch on 'm-c' and push it again to phabricator?
I got three emails from reviewbot about this yesterday in bug 1448880.

For example,
  https://phabricator.services.mozilla.com/D6986#inline-40666

These patches were rebased onto mozilla-central yesterday.
Flags: needinfo?(jorendorff) → needinfo?(bpostelnicu)
Fwiw, this is causing so much mail spam from phabricator it's drowning out almost all the signal for me...
I will disable this checker until we don’t have a working solution to avoid this false positive.
Flags: needinfo?(bpostelnicu)
Sorry again for the noise that this checker has created, I've wrote the patch that disables this, let's make sure we don't regress: https://treeherder.mozilla.org/#/jobs?repo=try&revision=eb97ee3d23b7ace71cdb67d8c81c9c3c5e066467&selectedJob=208669171
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/95bc945b6cd6
[Clang-Tidy] Disable 'readability-implicit-bool-conversion' check. r=sylvestre
https://hg.mozilla.org/mozilla-central/rev/95bc945b6cd6
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.