f4852f4c81
This chnage adds the pre-commit config and tox targets to run codespell both indepenetly and via the pep8 target. This change correct all the final typos in the codebase as detected by codespell. Change-Id: Ic4fb5b3a5559bc3c43aca0a39edc0885da58eaa2
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
---
|
|
default_language_version:
|
|
# force all unspecified python hooks to run python3
|
|
python: python3
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.4.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: mixed-line-ending
|
|
args: ['--fix', 'lf']
|
|
exclude: '.*\.(svg)$'
|
|
- id: check-byte-order-marker
|
|
- id: check-executables-have-shebangs
|
|
- id: check-merge-conflict
|
|
- id: debug-statements
|
|
# nova/cmd/manage.py imports pdb on purpose.
|
|
exclude: 'nova/cmd/manage.py'
|
|
- id: check-yaml
|
|
files: .*\.(yaml|yml)$
|
|
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
|
rev: v1.5.4
|
|
hooks:
|
|
- id: remove-tabs
|
|
exclude: '.*\.(svg)$'
|
|
- repo: https://opendev.org/openstack/hacking
|
|
rev: 6.0.1
|
|
hooks:
|
|
- id: hacking
|
|
additional_dependencies: []
|
|
exclude: '^(doc|releasenotes|tools)/.*$'
|
|
- 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.4
|
|
hooks:
|
|
- id: codespell
|
|
args: ['--ignore-words=doc/dictionary.txt'] |