devstack-plugin-prometheus/.pre-commit-config.yaml
Chandan Kumar (raukadah) 320be4174f Use pre-commit in ci
This review moves bashate check to pre-commit and also
adds other pre-commit checks for the repo.

Change-Id: I2ec26fc3036b4bfc9fa09fd088bd0e9089fae9fe
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
2025-01-28 17:56:45 +05:30

54 lines
1.4 KiB
YAML

---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# whitespace
- id: trailing-whitespace
- id: mixed-line-ending
args: ['--fix', 'lf']
exclude: '.*\.(svg)$'
- id: check-byte-order-marker
# file format and permissions
- id: check-ast
- id: debug-statements
- id: check-json
files: .*\.json$
- id: check-yaml
files: .*\.(yaml|yml)$
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
# git
- id: check-added-large-files
- id: check-case-conflict
- id: detect-private-key
- id: check-merge-conflict
- 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/sphinx-contrib/sphinx-lint
rev: v1.0.0
hooks:
- id: sphinx-lint
args: [--enable=default-role]
files: ^doc
types: [rst]
- repo: https://github.com/PyCQA/doc8
rev: v1.1.2
hooks:
- id: doc8
- repo: https://github.com/openstack/bashate
rev: 2.1.1
hooks:
- id: bashate
entry: bashate -v -iE006,E040
types: [shell]