Ignore 'No relevant changes found.' text
This commit is contained in:
parent
2fc3174a5c
commit
3ee08f18bc
1 changed files with 7 additions and 2 deletions
|
@ -337,11 +337,14 @@ class BuildReport:
|
||||||
self.comments.append(section_title('clang-tidy', False, False))
|
self.comments.append(section_title('clang-tidy', False, False))
|
||||||
return
|
return
|
||||||
p = os.path.join(self.results_dir, self.clang_tidy_result)
|
p = os.path.join(self.results_dir, self.clang_tidy_result)
|
||||||
if os.stat(p).st_size > 0:
|
add_artifact = False
|
||||||
self.api.add_artifact(self.ph_id, self.clang_tidy_result, 'clang-tidy ' + self.name, self.results_url)
|
|
||||||
ignore = pathspec.PathSpec.from_lines(pathspec.patterns.GitWildMatchPattern,
|
ignore = pathspec.PathSpec.from_lines(pathspec.patterns.GitWildMatchPattern,
|
||||||
open(self.clang_tidy_ignore, 'r').readlines())
|
open(self.clang_tidy_ignore, 'r').readlines())
|
||||||
for line in open(p, 'r'):
|
for line in open(p, 'r'):
|
||||||
|
line = line.strip()
|
||||||
|
if len(line) == 0 or line == 'No relevant changes found.':
|
||||||
|
continue
|
||||||
|
add_artifact = True
|
||||||
match = re.search(pattern, line)
|
match = re.search(pattern, line)
|
||||||
if match:
|
if match:
|
||||||
file_name = match.group(1)
|
file_name = match.group(1)
|
||||||
|
@ -370,6 +373,8 @@ class BuildReport:
|
||||||
'char': int(char_pos),
|
'char': int(char_pos),
|
||||||
'description': '{}: {}'.format(severity, text),
|
'description': '{}: {}'.format(severity, text),
|
||||||
})
|
})
|
||||||
|
if add_artifact:
|
||||||
|
self.api.add_artifact(self.ph_id, self.clang_tidy_result, 'clang-tidy ' + self.name, self.results_url)
|
||||||
success = errors_count + warn_count == 0
|
success = errors_count + warn_count == 0
|
||||||
comment = section_title('clang-tidy', success, present)
|
comment = section_title('clang-tidy', success, present)
|
||||||
if not success:
|
if not success:
|
||||||
|
|
Loading…
Reference in a new issue