Bug 1550517 - Exclude 3rd party files on static-analysis check, r=sylvestre.

Differential Revision: https://phabricator.services.mozilla.com/D45630

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Bastien Abadie 2019-09-12 08:49:40 +00:00
Родитель ebe6e6fb2d
Коммит 0725033ef3
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -237,7 +237,10 @@ class StaticAnalysis(MachCommandBase):
if name_re.search(f['file']):
total = total + 1
if not total:
# Filter source to remove excluded files
source = self._generate_path_list(source, verbose=verbose)
if not total or not source:
self.log(logging.INFO, 'static-analysis', {},
"There are no files eligible for analysis. Please note that 'header' files "
"cannot be used for analysis since they do not consist compilation units.")
@ -1909,7 +1912,7 @@ class StaticAnalysis(MachCommandBase):
if self._is_ignored_path(ignored_dir_re, f):
# Early exit if we have provided an ignored directory
if verbose:
print("clang-format: Ignored third party code '{0}'".format(f))
print("static-analysis: Ignored third party code '{0}'".format(f))
continue
if os.path.isdir(f):