Skip to content

Commit b2318f0

Browse files
committed
Fix linting
`ruff check --diff` implies `--fix-only` and therefor ignores some rules.
1 parent 9664aa1 commit b2318f0

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: |
3333
pip3 install ruff
3434
ruff format --check --diff plugin-template utils.py
35-
ruff check --diff plugin-template utils.py
35+
ruff check plugin-template utils.py
3636
- name: "Bootstrap catdog plugin"
3737
working-directory: "plugin_template"
3838
run: |
@@ -54,7 +54,7 @@ jobs:
5454
5555
- name: "Lint code"
5656
run: |
57-
ruff check --diff
57+
ruff check
5858
5959
- name: "Check for common gettext problems"
6060
run: |

plugin-template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ def remove_deprecated_files(plugin_root_dir: Path, sections: list[str]) -> None:
511511
def reformat_files(plugin_root_dir: Path, config: dict[str, t.Any]) -> None:
512512
try:
513513
subprocess.run(["ruff", "format"], cwd=plugin_root_dir)
514+
subprocess.run(["ruff", "check", "--select", "I", "--fix"], cwd=plugin_root_dir)
514515
except FileNotFoundError:
515516
pass
516517

templates/ci/Makefile.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ lint:
99
yamllint -s -d '{extends: relaxed, rules: {line-length: disable}}' .github/workflows
1010
bump-my-version bump --dry-run release
1111
ruff format --check --diff
12-
ruff check --diff
12+
ruff check
1313
{%- if check_manifest %}
1414
check-manifest
1515
{%- endif %}

templates/github/.github/workflows/lint.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: "Lint code"
3636
run: |
37-
ruff check --diff
37+
ruff check
3838
{%- if check_gettext %}
3939

4040
- name: "Check for common gettext problems"

0 commit comments

Comments
 (0)