Skip to main content

SKY-R104 · Quality, structure and performance

Pre-commit policy

Low

pre-commit runs checks such as linters and formatters on each commit, from a .pre-commit-config.yaml file in the repository. SKY-R104 reports a project that has no such file at its root.

Languages
Python, TypeScript, JavaScript, Java, Go
Quality gate
counted toward the gate limits (full and diff scans). Advice that is measured on every --quality scan but not listed by default. It is listed, and counted toward max_quality, with --all-advice or when the rule is named in [tool.skylos.gate] rules. A diff scan checks it only when the change touches a policy file.
Finding type
advice
Wrong result? Report itA false positive, a missed case or a confusing message: it goes privately to the founder.

Why it matters

Without commit hooks, every check waits for CI, so simple mistakes cost a full pipeline run and a second push, and some developers skip the checks entirely when working locally.

What Skylos flags

pyproject.toml · TOML
[project]name = "shop"version = "1.0.0"
app/pricing.py · Python
"""Price helpers."""  def total(prices):    return sum(prices)

What Skylos leaves alone

pyproject.toml: same as in the flagged example.

.pre-commit-config.yml · YAML
repos:  - repo: https://github.com/astral-sh/ruff-pre-commit    rev: v0.6.9    hooks:      - id: ruff

app/pricing.py: same as in the flagged example.

Why Skylos leaves it alone

The configuration uses the shorter .yml extension, which pre-commit also reads. Skylos accepts both .pre-commit-config.yaml and .pre-commit-config.yml.

How Skylos decides

  1. Runs with --quality, once per scanned project, for every language. A diff scan runs it only when a policy file is among the changed files.
  2. Looks for .pre-commit-config.yaml or .pre-commit-config.yml at the project root. Its contents are not checked.
  3. When neither exists, reports LOW on the project folder.

How to fix it

Add a .pre-commit-config.yaml with the checks you want on every commit, and run pre-commit install once per clone.

.pre-commit-config.yaml · YAML
repos:  - repo: https://github.com/astral-sh/ruff-pre-commit    rev: v0.6.9    hooks:      - id: ruff      - id: ruff-format

When it can be wrong

  • Projects that run their commit hooks with another tool, such as Husky, lefthook or a hand-written .git/hooks script, are reported.
  • An empty or broken .pre-commit-config.yaml is accepted, because only its presence is checked.

Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.

How to silence it

  • ignore = ["SKY-R104"] under [tool.skylos] turns the check off. The finding points at the project folder, so there is no line for an inline marker.

From the Skylos rule handbook, Skylos 5.8.0 (commit 5b880b0). All rules.