Closed
Bug 1488687
Opened 6 years ago
Closed 6 years ago
Enable braces around statements clang-tidy checker
Categories
(Developer Infrastructure :: Source Code Analysis, enhancement)
Developer Infrastructure
Source Code Analysis
Tracking
(firefox64 fixed)
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
As it is clear in the coding style that we should have braces: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Control_Structures
I propose to enable the checker:
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
Assignee | ||
Comment 1•6 years ago
|
||
Of course, this will be enabled only at review phase.
If the warning is ignored in phabricator, nothing will happen.
Assignee | ||
Comment 2•6 years ago
|
||
This will be enabled only at review phase.
If the warning is ignored in phabricator, nothing will happen.
Comment 3•6 years ago
|
||
Seems fair, since it's mandated by our coding style.
> Of course, this will be enabled only at review phase.
Note: This checker will also be active when you run `./mach static-analysis check` locally.
Also, FYI, there are about 32K pre-existing violations of this rule in our tree (including ignored paths like third-party dependencies):
https://github.com/jankeromnes/gecko-dev/commit/5dcb2201de8dd075f3c65c120c5157ec8133f883 (autofix run from 4 months ago)
Updated•6 years ago
|
Assignee: nobody → sledru
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Jan Keromnes [:janx] from comment #3)
>
> Also, FYI, there are about 32K pre-existing violations of this rule in our
> tree (including ignored paths like third-party dependencies):
Interesting, codechecker is finding 16270 occurrences including thirdparty...
Comment 5•6 years ago
|
||
Comment on attachment 9006485 [details]
Bug 1488687 - Enable braces around statements clang-tidy checker r?ehsan
:Ehsan Akhgari has approved the revision.
Attachment #9006485 -
Flags: review+
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/19bac49e4951
Enable braces around statements clang-tidy checker r=Ehsan
Comment 7•6 years ago
|
||
Is this going to complain for stuff in the js/ dir or is that ignored? IIRC they don't like braces.
Comment 8•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Assignee | ||
Comment 9•6 years ago
|
||
Eric, they are discussing about using the braces too:
https://groups.google.com/forum/#!topic/mozilla.dev.tech.js-engine.internals/koX9Yu0uFRw
(this is what triggered this commits ;)
Assignee | ||
Comment 10•6 years ago
|
||
See bug 1488698
Comment 11•6 years ago
|
||
(In reply to Sylvestre Ledru [:sylvestre] from comment #9)
> Eric, they are discussing about using the braces too:
> https://groups.google.com/forum/#!topic/mozilla.dev.tech.js-engine.internals/
> koX9Yu0uFRw
> (this is what triggered this commits ;)
Oh that's great!
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•