Commit Graph

6 Commits

Author SHA1 Message Date
unkinben fbb3471a42 refactor: use make test in pre-commit hook 2026-05-17 11:40:59 +10:00
unkinben 451254447f feat: add pytest pre-commit hook and tests scaffold (issue #162)
- pyproject.toml with pytest>=8 in [dependency-groups.dev] so
  uv run --group dev pytest resolves without a global install
- tests/__init__.py and tests/conftest.py skeleton referencing issue #162
- pre-commit local hook runs pytest tests/ on Python file changes;
  exit code 5 (no tests collected) is treated as success so commits
  are not blocked while the test suite is being built out
2026-05-17 11:35:03 +10:00
unkinben be23a37c2e feat: JSON Schema validation for metadata.yaml as pre-commit hook
Adds schema/metadata.json (JSON Schema draft-07) as the authoritative
schema for all rpms/*/metadata.yaml files.  Key constraints:

- additionalProperties: false at both the top level and builds items,
  so unknown fields are rejected outright
- name allows dots (fixes neovim-glibc-2.17)
- github is optional (fixes claude-code, which has no GitHub repo)
- repository enum includes fedora/42, fedora/43, fedora/44
- dist_tag boolean field documented in schema

Pre-commit hook (check-jsonschema 0.37.2) runs against every file
matching ^rpms/[^/]+/metadata\.yaml$ on every commit.

Also fixes rpms/claude-code/metadata.yaml: removes the unknown
claude_ai field and normalises field order.
2026-05-17 11:14:35 +10:00
unkinben b18e34c905 feat: additional pre-commit checks
Build / build-8 (pull_request) Successful in 10s
Build / build-9 (pull_request) Successful in 10s
- add all precommit checks from pre-commit's hooks repo
- ensure scripts with shebangs are executable
2026-03-07 17:04:48 +11:00
unkinben a0b8d8b806 feat: update pre-commit with more tests
Build / build-9 (pull_request) Successful in 14s
Build / build-8 (pull_request) Successful in 17s
- autofix the end-of-file
- report trailing whitespace
2026-03-01 23:43:31 +11:00
unkinben 3fa0d39d43 feat: add pre-commit
Build / build-8 (pull_request) Successful in 8s
Build / build-9 (pull_request) Successful in 8s
- test yamllint
- test ruff linting/formatter
- fix yaml errors
2025-11-30 21:45:55 +11:00