Skip to content

Commit dca1675

Browse files
committed
Only print filename if there are annotations for it.
1 parent faff711 commit dca1675

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

flake8_github_action/flake8_app.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ def report(self):
137137
json_annotations = json.loads(self.formatter.output_fd.getvalue()).items()
138138

139139
for filename, raw_annotations in json_annotations:
140-
print(filename)
140+
if raw_annotations:
141+
print(filename)
142+
141143
for annotation in raw_annotations:
142144
print(Annotation.from_flake8json(filename, annotation).to_str())
143145

@@ -148,3 +150,6 @@ def __init__(self, *args, **kwargs):
148150
super().__init__(*args, **kwargs)
149151

150152
self.output_fd = StringIO()
153+
154+
155+

0 commit comments

Comments
 (0)