Skip to content

fix(lint): skip ruff with a warning when the repository doesn't pin it #567

Open

Description

@DevSecNinja

The ruff linter from #562 (unreleased, held in #566) fails in every Python repository that doesn't pin ruff in its mise config. A read-only fleet check found 8 managed repos with Python files and a lint.yml caller, and none of them pins ruff. After the Renovate bump, each would get a red ruff check (or a red workflow with lint-fail-on-error) that says "'ruff' is not pinned", before ruff checks any code.

Proposal

When a repository has Python files but its mise config doesn't pin ruff, scripts/lint/ruff.sh skips ruff with a ::warning that names the fix: pin ruff in .mise.toml (Renovate-managed) and add a ruff config (ruff.toml or [tool.ruff] in pyproject.toml). Pinning ruff is the opt-in. Once it's pinned, findings fail as designed.

Biome and PSScriptAnalyzer (#563, #564) apply the same rule.

Refs #539

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions