Closed
Bug 1391231
Opened 7 years ago
Closed 7 years ago
Use the list provided by .clang-format-ignore instead of only thirdpartypath.txt
Categories
(Developer Infrastructure :: Source Code Analysis, enhancement)
Developer Infrastructure
Source Code Analysis
Tracking
(firefox57 fixed)
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
The thirdparty list only contains thirdparty code but we also want to ignore some of our code.
As .clang-format-ignore also contains the content of thirdparthpath.txt, let's us this one (especially as we can use regexp now)
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•7 years ago
|
||
As an example:
$ ./mach clang-format -p dom/presentation/ toolkit/components/protobuf/ config/gcc-stl-wrapper.template.h
clang-format: Ignored third party code 'toolkit/components/protobuf/'
clang-format: Ignored third party code 'config/gcc-stl-wrapper.template.h'
I landed this patch upstream:
https://reviews.llvm.org/rL310778
to have a better display in the tool
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•7 years ago
|
||
The ignore list will be also used when doing
./mach clang-format -p .
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8898271 [details]
Bug 1391231 - Use the list provided by .clang-format-ignore instead of only thirdpartypath.txt
https://reviewboard.mozilla.org/r/169636/#review175392
FWIW, the use of regular expressions for path matching as employed by ``.clang-ignore-patterns`` and used in this file hits scaling limits. I know because Mercurial has dealt with this problem on several fronts. glob based matching (using ``*``) to denote wildcards is much better (especially if you can limit the wildcard to only occurring at the end of the string). I'm not sure if this will be a problem for us. But it is worth mentioning just so it is on your radar.
::: tools/mach_commands.py:293
(Diff revision 2)
> + ignored_dir_re = '(%s)' % '|'.join(ignored_dir)
> extensions = ('.cpp', '.c', '.h')
>
> path_list = []
> for f in paths:
> - if f.startswith(ignored_dir):
> + import re
You can move this to module level: this module is already imported elsewhere.
Attachment #8898271 -
Flags: review?(gps) → review+
Comment hidden (mozreview-request) |
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b6c847346cb6
Use the list provided by .clang-format-ignore instead of only thirdpartypath.txt r=gps
Comment 8•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•7 years ago
|
Product: Core → Firefox Build System
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
•