podman/.pre-commit-config.yaml
Chris Evich abf4f77bc7
Cirrus: Simplify use of cache in automation
With the increasingly complex `.cirrus.yml` task relationships, build
cache wasn't always working as intended.  Recently, non-build tasks were
observed assuming authority over `gopath_cache`.  Ref.:
https://github.com/containers/podman/pull/13998#issuecomment-1108834538

Address this by an overall simplification using artifacts instead of
cache.  Using artifacts allows establishing concrete
authorship/authority over cached repo. content.  In this way, dependent
tasks may simply consume the artifact with `curl` instead of relying on
complex caching algorithms.

Also/Minor: Add YAML checking to the pre-commit configuration.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-05-10 10:49:32 -04:00

21 lines
839 B
YAML

---
exclude: ^vendor/|^test/tools/vendor/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v3.4.0
hooks:
# buildah-tests.diff is generated by 'git format-patch' and includes
# trailing whitespace as part of its format. We can work around that,
# but unfortunately the buildah repo has some files with tabs, which
# git-diff formats as '[+/-]<space><tab>', which these hooks choke on.
# Just disable checks on this diff file as a special case.
- id: end-of-file-fixer
exclude: test/buildah-bud/buildah-tests.diff
- id: trailing-whitespace
exclude: test/buildah-bud/buildah-tests.diff
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-yaml