63cf28c90e
The hand-rolled pre-commit.sh reimplemented what upstream hooks already do. Move to pre-commit.com with the estate's usual pre-commit-hooks set plus hadolint and shellcheck, and keep the one check with no upstream equivalent (distros/ vs the Woodpecker matrices) as a repo: local hook. The test harness goes; tests will be reintroduced differently. - add .pre-commit-config.yaml and ci/check-distros.sh - delete pre-commit.sh, test.sh and .woodpecker/test.yaml - run uvx pre-commit run --all-files from .woodpecker/pre-commit.yaml and make pre-commit - drop the Dockerfile test stage and the make test targets
31 lines
795 B
YAML
31 lines
795 B
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v5.0.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-merge-conflict
|
|
- id: mixed-line-ending
|
|
args: [--fix=lf]
|
|
|
|
- repo: https://github.com/AleksaC/hadolint-py
|
|
rev: v2.15.1
|
|
hooks:
|
|
- id: hadolint
|
|
|
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
|
rev: v0.11.0.1
|
|
hooks:
|
|
- id: shellcheck
|
|
|
|
# No upstream equivalent: a distro added under distros/ but left out of a
|
|
# Woodpecker matrix silently never gets built.
|
|
- repo: local
|
|
hooks:
|
|
- id: check-distros
|
|
name: distros match the woodpecker matrices
|
|
entry: ci/check-distros.sh
|
|
language: system
|
|
pass_filenames: false
|