2019-06-15 16:50:35 +01:00
|
|
|
---
|
2020-01-14 14:59:08 +00:00
|
|
|
default_language_version:
|
|
|
|
# force all unspecified python hooks to run python3
|
|
|
|
python: python3
|
2019-06-15 16:50:35 +01:00
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2022-04-05 13:02:18 +01:00
|
|
|
rev: v4.1.0
|
2019-06-15 16:50:35 +01:00
|
|
|
hooks:
|
|
|
|
- id: trailing-whitespace
|
|
|
|
- id: mixed-line-ending
|
|
|
|
args: ['--fix', 'lf']
|
2019-08-01 10:44:08 -04:00
|
|
|
exclude: '.*\.(svg)$'
|
2019-06-15 16:50:35 +01:00
|
|
|
- id: check-byte-order-marker
|
|
|
|
- id: check-executables-have-shebangs
|
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: debug-statements
|
2019-08-01 10:44:08 -04:00
|
|
|
# nova/cmd/manage.py imports pdb on purpose.
|
|
|
|
exclude: 'nova/cmd/manage.py'
|
2019-06-15 16:50:35 +01:00
|
|
|
- id: check-yaml
|
|
|
|
files: .*\.(yaml|yml)$
|
|
|
|
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
2022-04-05 13:02:18 +01:00
|
|
|
rev: v1.1.13
|
2019-06-15 16:50:35 +01:00
|
|
|
hooks:
|
|
|
|
- id: remove-tabs
|
2019-08-01 10:44:08 -04:00
|
|
|
exclude: '.*\.(svg)$'
|
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: flake8
|
|
|
|
name: flake8
|
|
|
|
additional_dependencies:
|
2022-04-05 13:02:18 +01:00
|
|
|
- hacking>=3.1.0,<3.2.0
|
2019-08-01 10:44:08 -04:00
|
|
|
language: python
|
|
|
|
entry: flake8
|
|
|
|
files: '^.*\.py$'
|
|
|
|
exclude: '^(doc|releasenotes|tools)/.*$'
|
2021-08-26 14:16:19 +01:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-autopep8
|
2022-04-05 13:02:18 +01:00
|
|
|
rev: v1.6.0
|
2021-08-26 14:16:19 +01:00
|
|
|
hooks:
|
|
|
|
- id: autopep8
|
|
|
|
files: '^.*\.py$'
|