Skip to content

Add ruff linter and formatter to pre-commit and CI #218

@markuslf

Description

@markuslf

Add ruff (linter + formatter) to enforce consistent code style across the repository.

What to do

  • Add ruff-check and ruff-format hooks to .pre-commit-config.yaml
  • Add [tool.ruff] configuration to pyproject.toml with:
    • quote-style = 'single' (single quotes for strings, """ for triple-quoted)
    • Lint rules: E, W, F, I, B, C4, UP, SIM, RUF
  • Apply ruff format to all Python files
  • Fix any ruff check violations

Reference

See monitoring-plugins/pyproject.toml and firewallfabrik/pyproject.toml for the configuration pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions