Bug 1405607 - do not pass to run-clang-tidy files that are going to be scanned. r?sylvestre
MozReview-Commit-ID: BPyk9v7vzLr
--- 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)