Bug 1405607 - do not pass to run-clang-tidy files that are going to be scanned. r?sylvestre draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Wed, 04 Oct 2017 12:41:31 +0300
changeset 674759 36c7b9335697279d0ef054a40128a2841da34d5d
parent 674178 11fe0a2895aab26c57bcfe61b3041d7837e954cd
child 734420 14d49564d69d75e7dac8dae172597504265a336a
push id82934
push userbmo:bpostelnicu@mozilla.com
push dateWed, 04 Oct 2017 09:42:36 +0000
reviewerssylvestre
bugs1405607
milestone58.0a1
Bug 1405607 - do not pass to run-clang-tidy files that are going to be scanned. r?sylvestre MozReview-Commit-ID: BPyk9v7vzLr
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -2230,29 +2230,27 @@ class StaticAnalysis(MachCommandBase):
                        '-extra-arg=-DMOZ_CLANG_PLUGIN']
         if fix:
             common_args.append('-fix')
 
         self.log_manager.register_structured_logger(logging.getLogger('mozbuild'))
 
         compile_db = json.loads(open(self._compile_db, 'r').read())
         total = 0
-        files = []
         import re
         name_re = re.compile('(' + ')|('.join(source) + ')')
         for f in compile_db:
             if name_re.search(f['file']):
                 total = total + 1
-                files.append(f['file'])
 
         if not total:
             return 0
 
         args = [python, self._run_clang_tidy_path, '-p', self.topobjdir]
-        args += ['-j', str(jobs)] + files + common_args
+        args += ['-j', str(jobs)] + source + common_args
         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)