Skip to content

Commit 3861be3

Browse files
resolve conversation
1 parent e20de3f commit 3861be3

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

.github/workflows/report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
working-directory: ./artifacts
3232
run: |
3333
poetry run coverage combine --keep coverage-python3.9*/.coverage
34+
# Errors during copying are ignored because they are checked in the next step
3435
cp .coverage ../ || true
3536
cp lint-python3.9/.lint.txt ../ || true
3637
cp lint-python3.9/.lint.json ../ || true

exasol/toolbox/templates/github/workflows/report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
working-directory: ./artifacts
3232
run: |
3333
poetry run coverage combine --keep coverage-python3.9*/.coverage
34+
# Errors during copying are ignored because they are checked in the next step
3435
cp .coverage ../ || true
3536
cp lint-python3.9/.lint.txt ../ || true
3637
cp lint-python3.9/.lint.txt ../ || true

exasol/toolbox/tools/lint.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
@dataclass(frozen=True)
13-
class LintIssue:
13+
class Finding:
1414
type: str
1515
module: str
1616
obj: str
@@ -24,10 +24,10 @@ class LintIssue:
2424
message_id: str
2525

2626

27-
def lint_issue_from_json(data: str) -> Iterable[LintIssue]:
27+
def lint_issue_from_json(data: str) -> Iterable[Finding]:
2828
issues = json.loads(data)
2929
for issue in issues:
30-
yield LintIssue(
30+
yield Finding(
3131
type=issue["type"],
3232
module=issue["module"],
3333
obj=issue["obj"],
@@ -42,20 +42,20 @@ def lint_issue_from_json(data: str) -> Iterable[LintIssue]:
4242
)
4343

4444

45-
def lint_issue_to_markdown(lint_issues: Iterable[LintIssue]) -> str:
45+
def lint_issue_to_markdown(lint_issues: Iterable[Finding]) -> str:
4646
def _header() -> str:
4747
header = "# Static Code Analysis\n\n"
4848
header += "|File|line/<br>column|id|message|\n"
4949
header += "|---|:-:|:-:|---|\n"
5050
return header
5151

52-
def _rows(issues: Iterable[LintIssue]) -> str:
52+
def _rows(findings: Iterable[Finding]) -> str:
5353
rows = ""
54-
for issue in issues:
55-
rows += f"|{issue.path}"
56-
rows += f"|line: {issue.line}/<br>column: {issue.column}"
57-
rows += f"|{issue.message_id}"
58-
rows += f"|{issue.message}|\n"
54+
for finding in findings:
55+
rows += f"|{finding.path}"
56+
rows += f"|line: {finding.line}/<br>column: {finding.column}"
57+
rows += f"|{finding.message_id}"
58+
rows += f"|{finding.message}|\n"
5959
return rows
6060

6161
template = cleandoc(

test/unit/lint_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
)
2626
def test_lint_issue_from_json(data):
2727
actual = lint.lint_issue_from_json(json.dumps([data]))
28-
expected = lint.LintIssue(
28+
expected = lint.Finding(
2929
type=data["type"],
3030
module=data["module"],
3131
obj=data["obj"],
@@ -68,7 +68,7 @@ def test_lint_issue_from_json(data):
6868
],
6969
)
7070
def test_lint_issue_to_markdown(data, expected):
71-
issue = lint.LintIssue(
71+
issue = lint.Finding(
7272
type=data["type"],
7373
module=data["module"],
7474
obj=data["obj"],

0 commit comments

Comments
 (0)