Skip to content

Commit bd3ceb6

Browse files
committed
ci/linter: add per file linter ignores for gen_autosuspend_rules.py
1 parent adae51d commit bd3ceb6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/linter.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,23 @@ jobs:
6464
run: |
6565
mkosi box -- ruff --version
6666
# shellcheck disable=SC2046
67-
if ! mkosi box -- ruff format --check $(git ls-files -- *.py | sed -e '/gen_autosuspend_rules/d')
67+
if ! mkosi box -- ruff format --check
6868
then
6969
echo "Please run 'ruff format' on the above files or apply the diffs below manually"
7070
# shellcheck disable=SC2046
71-
mkosi box -- ruff format --check --quiet --diff $(git ls-files -- *.py | sed -e '/gen_autosuspend_rules/d')
71+
mkosi box -- ruff format --check --quiet --diff
7272
fi
7373
7474
- name: Run ruff check
7575
run: |
7676
mkosi box -- ruff --version
7777
# shellcheck disable=SC2046
78-
if ! mkosi box -- ruff check $(git ls-files -- *.py | sed -e '/gen_autosuspend_rules/d')
78+
if ! mkosi box -- ruff check
7979
then
8080
echo "Please fix the errors shown by 'ruff check' on the above files or add noqa comments were appropriate"
8181
echo "Diffs for fixes that can be programmatically generated are shown below:"
8282
# shellcheck disable=SC2046
83-
mkosi box -- ruff check --diff $(git ls-files -- *.py | sed -e '/gen_autosuspend_rules/d')
83+
mkosi box -- ruff check --diff
8484
fi
8585
8686
- name: Configure meson

ruff.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ lint.select = ["E", "F", "I", "Q", "UP"]
55
# E731: lambda-assignment
66
lint.ignore = ["E501"]
77

8+
[lint.per-file-ignores]
9+
"tools/chromiumos/gen_autosuspend_rules.py" = ["Q000", "Q001"]
10+
811
[format]
912
# The formatter prefers double quotes for multiline quotes,
1013
# Hence, let's make the formatter not change quotations.

0 commit comments

Comments
 (0)