Skip to content

Commit faff711

Browse files
committed
Print filenames to give some reference in the GitHub Actions Log.
1 parent bf97018 commit faff711

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

.github/workflows/flake8.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ jobs:
2929
python -m pip install .
3030
3131
- name: "Run Flake8"
32-
run: "python -m flake8_github_action flake8_github_action"
32+
run: "python -m flake8_github_action flake8_github_action --exit-zero"
3333
env:
3434
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

flake8_github_action/flake8_app.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,12 @@ def report(self):
134134

135135
super().report()
136136

137-
annotations: List[Annotation] = []
138-
139137
json_annotations = json.loads(self.formatter.output_fd.getvalue()).items()
140-
for filename, raw_annotations in json_annotations:
141-
annotations.extend(Annotation.from_flake8json(filename, ann) for ann in raw_annotations)
142138

143-
for annotation in annotations:
144-
print(annotation.to_str())
139+
for filename, raw_annotations in json_annotations:
140+
print(filename)
141+
for annotation in raw_annotations:
142+
print(Annotation.from_flake8json(filename, annotation).to_str())
145143

146144

147145
class JsonFormatter(DefaultJSON):
@@ -150,6 +148,3 @@ def __init__(self, *args, **kwargs):
150148
super().__init__(*args, **kwargs)
151149

152150
self.output_fd = StringIO()
153-
154-
155-

0 commit comments

Comments
 (0)