Closed Bug 1405654 Opened 7 years ago Closed 7 years ago

[Mach][Static-Analysis] Default value for header-filter should be the target file/directory

Categories

(Developer Infrastructure :: Source Code Analysis, enhancement)

enhancement
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: andi, Assigned: andi)

References

Details

Attachments

(1 file)

We should have the value for header-filter set as the target file/directory. By this we limit the static analysis to be relevant only for the current target file/directory.
Comment on attachment 8915108 [details]
Bug 1405654 - set default value for header-filter the same as source.

https://reviewboard.mozilla.org/r/186374/#review191800

::: python/mozbuild/mozbuild/mach_commands.py:2236
(Diff revision 1)
>  
>          common_args = ['-clang-tidy-binary', self._clang_tidy_path,
>                         '-checks=%s' % checks,
>                         '-extra-arg=-DMOZ_CLANG_PLUGIN']
>  
>          if len(header_filter):

This could get some refactoring love.

Either define '-header-filter=%s' only once and keep the "if else"

or do
common_args.append('-header-filter=%s' % header_filter if len(header_filter) else ''.join(source))
Attachment #8915108 - Flags: review?(sledru)
Comment on attachment 8915108 [details]
Bug 1405654 - set default value for header-filter the same as source.

https://reviewboard.mozilla.org/r/186374/#review191874
Attachment #8915108 - Flags: review?(sledru) → review+
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7b6a396e9ca3
set default value for header-filter the same as source. r=sylvestre
https://hg.mozilla.org/mozilla-central/rev/7b6a396e9ca3
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: