Skip to content

Refactor make lint: root pre-commit config runs twice #251

@peteski22

Description

@peteski22

While reviewing #250 I noticed make lint runs the root .pre-commit-config.yaml's hooks twice in a single invocation.

plugins/cq/ and server/backend/ both lack a local .pre-commit-config.yaml, so cd <subdir> && pre-commit run walks up to the root config in both cases. sdk/python/ has its own local config and is the odd one out.

Result: the root config's hooks (ty (plugin), ty (sdk/python), ty (server/backend), and the uv lock --check (...) trio added in #250) execute twice during a full make lint — once via lint-plugin and once via lint-server-backend. The hooks are gated by files: regex so the actual work isn't always duplicated, but the listing/skips are confusing and the structure is asymmetric.

Options to consider:

  • Give plugins/cq/ and server/backend/ their own local .pre-commit-config.yaml files (mirrors sdk/python/); the root config would then only host repo-wide hooks.
  • Or invert: drop sdk/python/.pre-commit-config.yaml and keep all hooks in the root config, with files: regexes scoping them per sub-project. Run pre-commit once via --all-files (lumigator-style).

Independent of #250.

Metadata

Metadata

Assignees

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