Bug 1472721 - mach static-analysis - use header_filter regex expression in order to better filter files. r=janx
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 03 Jul 2018 14:37:46 +0300
changeset 424866 5049afd1f26a45cf3ea81636347cba4cd3ddfcc5
parent 424865 001370fe21e34de588e40da2e140f2482acf6364
child 424867 608e35dbe664777332f5ed774c521678df32caf7
push id104933
push usershindli@mozilla.com
push dateTue, 03 Jul 2018 22:35:47 +0000
treeherdermozilla-inbound@00de580e868f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanx
bugs1472721
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1472721 - mach static-analysis - use header_filter regex expression in order to better filter files. r=janx MozReview-Commit-ID: JXzs46L23rM
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1670,34 +1670,34 @@ class StaticAnalysis(MachCommandBase):
                        '-checks=%s' % checks,
                        '-extra-arg=-DMOZ_CLANG_PLUGIN']
 
         # Flag header-filter is passed to 'run-clang-tidy' in order to limit
         # the diagnostic messages only to the specified header files.
         # When no value is specified the default value is considered to be the source
         # in order to limit the dianostic message to the source files or folders.
         common_args.append('-header-filter=%s' %
-                           (header_filter if len(header_filter) else ''.join(source)))
+                           (header_filter if len(header_filter) else '|'.join(source)))
 
         if fix:
             common_args.append('-fix')
 
         compile_db = json.loads(open(self._compile_db, 'r').read())
         total = 0
         import re
         name_re = re.compile('(' + ')|('.join(source) + ')')
         for f in compile_db:
             if name_re.search(f['file']):
                 total = total + 1
 
         if not total:
             return 0
 
         args = [python, self._run_clang_tidy_path, '-p', self.topobjdir]
-        args += ['-j', str(jobs)] + source + common_args
+        args += ['-j', str(jobs)] + common_args + source
         cwd = self.topobjdir
 
         monitor = StaticAnalysisMonitor(self.topsrcdir, self.topobjdir, total)
 
         footer = StaticAnalysisFooter(self.log_manager.terminal, monitor)
         with StaticAnalysisOutputManager(self.log_manager, monitor, footer) as output:
             rc = self.run_process(args=args, line_handler=output.on_line, cwd=cwd)