SKY-R104 · Quality, structure and performance
Pre-commit policy
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
--qualityscan but not listed by default. It is listed, and counted towardmax_quality, with--all-adviceor 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
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
[project]name = "shop"version = "1.0.0""""Price helpers.""" def total(prices): return sum(prices)What Skylos leaves alone
repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.6.9 hooks: - id: ruffWhy 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
- 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. - Looks for
.pre-commit-config.yamlor.pre-commit-config.ymlat the project root. Its contents are not checked. - 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.
repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.6.9 hooks: - id: ruff - id: ruff-formatWhen it can be wrong
- Projects that run their commit hooks with another tool, such as Husky, lefthook or a hand-written
.git/hooksscript, are reported. - An empty or broken
.pre-commit-config.yamlis 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.