whitebox-tempest-plugin/.pre-commit-config.yaml
Sean Mooney a12607754f extend pre-commit with basic python linting
This change adds a number of basic linting check
including codespell and fixes the relevent issues in
the tempest plugin and playbooks.

conflicts were due to removing playbooks/templates/compute_nodes.yaml.j2
I1f22131dc04a2d7a5f010da2dfa3f4e9524656a2 removes compute_nodes.yaml.j2

Change-Id: Ife8704538555cb48954ad703b1354e3c69ee5884
2024-06-04 08:11:46 -04:00

60 lines
1.6 KiB
YAML

---
default_language_version:
# force all unspecified python hooks to run python3
python: python3
repos:
- repo: local
hooks:
- id: twine-check
name: twine-check
entry: tools/twine-check.sh
language: python
types: [python]
additional_dependencies: [twine]
args: ['--strict']
exclude: ^$ # don't run on empty files
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.9.1
hooks:
- id: sphinx-lint
args: [--enable=default-role]
files: ^README.rst
types: [rst]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
args: ['--fix', 'lf']
exclude: '.*\.(svg)$'
- id: check-added-large-files
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-symlinks
- id: destroyed-symlinks
- id: check-merge-conflict
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: no-commit-to-branch
- id: check-json
files: .*\.json$
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: remove-tabs
exclude: '.*\.(svg)$'
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.4
hooks:
- id: autopep8
files: '^.*\.py$'
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args: ['--ignore-words=dictionary.txt']