Files
cinder/.pre-commit-config.yaml
Stephen Finucane 41eee5c219 Integrate 'pre-commit'
This nifty tool provides a extensible way to configure pre-commit hooks
to do everything from running linters to spellchecking [1] and has
already been adopted by a few OpenStack projects [2]. Let's copy what
we've done elsewhere and migrate most of our linters to this. This makes
my life much easier as I work on the OpenAPI series since linting is
taken care of. Users who do not wish to use this can simply not do so.

[1] https://pre-commit.com/
[2] https://review.opendev.org/#/q/file:.pre-commit-config.yaml

Change-Id: I7dd14b4087d92f6bdae575581e03f991c519d57a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-10-24 13:52:33 +01:00

34 lines
899 B
YAML

---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
args: ['--fix', 'lf']
exclude: '.*\.(svg)$'
- id: fix-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
- id: check-json
files: .*\.json$
- id: check-yaml
files: .*\.(yaml|yml)$
exclude: 'rally-jobs/cinder.yaml'
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: remove-tabs
exclude: '.*\.(svg)$'
- repo: https://opendev.org/openstack/hacking
rev: 7.0.0
hooks:
- id: hacking
additional_dependencies: []
exclude: '^(doc|releasenotes|tools)/.*$'
- repo: https://github.com/PyCQA/doc8
rev: v2.0.0
hooks:
- id: doc8