Skip to content

Commit e1252ca

Browse files
author
Bastien Abadie
committed
bot: Allow reporting of 3rd party
1 parent 0add4f0 commit e1252ca

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

bot/code_coverage_bot/phabricator.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@ def _find_coverage(self, report, path):
5050
parts = path.split("/")
5151
for part in filter(None, parts):
5252
if part not in report["children"]:
53-
# Only send warning for supported extensions
54-
if self.is_supported_extension(path):
55-
logger.warn("Path {} not found in report".format(path))
56-
else:
53+
# Only send warning for non 3rd party + supported extensions
54+
if self.is_third_party(path):
55+
logger.info("Path not found in report for third party", path=path)
56+
elif not self.is_supported_extension(path):
5757
logger.info(
5858
"Path not found in report for unsupported extension", path=path
5959
)
60+
else:
61+
logger.warn("Path not found in report", path=path)
6062
return
6163
report = report["children"][part]
6264

@@ -146,11 +148,6 @@ def generate(self, report, changesets):
146148
# For each file...
147149
for path in changeset["files"]:
148150

149-
# Skip third party files
150-
if self.is_third_party(path):
151-
logger.info("Skip third party path", path=path)
152-
continue
153-
154151
# Retrieve the coverage data.
155152
coverage_record = self._find_coverage(report, path)
156153
if coverage_record is None:

0 commit comments

Comments
 (0)