diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ea696248..0a9eb53d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -32,7 +32,7 @@ jobs: run: | pip3 install ruff ruff format --check --diff plugin-template utils.py - ruff check --diff plugin-template utils.py + ruff check plugin-template utils.py - name: "Bootstrap catdog plugin" working-directory: "plugin_template" run: | @@ -54,7 +54,7 @@ jobs: - name: "Lint code" run: | - ruff check --diff + ruff check - name: "Check for common gettext problems" run: | diff --git a/plugin-template b/plugin-template index f016491b..902d78b0 100755 --- a/plugin-template +++ b/plugin-template @@ -511,6 +511,7 @@ def remove_deprecated_files(plugin_root_dir: Path, sections: list[str]) -> None: def reformat_files(plugin_root_dir: Path, config: dict[str, t.Any]) -> None: try: subprocess.run(["ruff", "format"], cwd=plugin_root_dir) + subprocess.run(["ruff", "check", "--select", "I", "--fix"], cwd=plugin_root_dir) except FileNotFoundError: pass diff --git a/templates/ci/Makefile.j2 b/templates/ci/Makefile.j2 index 7b0cdce2..36d8739d 100644 --- a/templates/ci/Makefile.j2 +++ b/templates/ci/Makefile.j2 @@ -9,7 +9,7 @@ lint: yamllint -s -d '{extends: relaxed, rules: {line-length: disable}}' .github/workflows bump-my-version bump --dry-run release ruff format --check --diff - ruff check --diff + ruff check {%- if check_manifest %} check-manifest {%- endif %} diff --git a/templates/github/.github/workflows/lint.yml.j2 b/templates/github/.github/workflows/lint.yml.j2 index dfc3e68d..1bc743b4 100644 --- a/templates/github/.github/workflows/lint.yml.j2 +++ b/templates/github/.github/workflows/lint.yml.j2 @@ -34,7 +34,7 @@ jobs: - name: "Lint code" run: | - ruff check --diff + ruff check {%- if check_gettext %} - name: "Check for common gettext problems"