
Enable flake8-bandit checks via the ruff checker. The flake8-bandit rules are prefixed with S instead of B like the bandit rules are but the numberical values are different. flake8-bandit provides the default config without needing it to be generated like bandit has in the ironic repo. The only exceptions to the default config in ironic is the skipping of 3 rules which is instead skipped just for tests instead of globally. The choice of ruff is intentional as other OpenStack projects are trending that way and more checks can be used in the future. Change-Id: Iec4b628a5d5425dd18b5a4fd76f61c504e3d53b0 Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
---
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.5.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: mixed-line-ending
|
|
args: ['--fix', 'lf']
|
|
exclude: |
|
|
(?x)(
|
|
.*.svg$|
|
|
)
|
|
- id: fix-byte-order-marker
|
|
- id: check-merge-conflict
|
|
- id: debug-statements
|
|
- id: check-json
|
|
files: .*\.json$
|
|
- id: check-yaml
|
|
files: .*\.(yaml|yml)$
|
|
exclude: releasenotes/.*$
|
|
- 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.1.0
|
|
hooks:
|
|
- id: hacking
|
|
additional_dependencies: []
|
|
exclude: '^(doc|releasenotes|tools)/.*$'
|
|
- repo: https://github.com/codespell-project/codespell
|
|
rev: v2.2.6
|
|
hooks:
|
|
- id: codespell
|
|
args: [--write-changes]
|
|
- repo: https://github.com/sphinx-contrib/sphinx-lint
|
|
rev: v1.0.0
|
|
hooks:
|
|
- id: sphinx-lint
|
|
args: [--enable=default-role]
|
|
files: ^doc/|releasenotes|api-ref
|
|
- repo: https://opendev.org/openstack/bashate
|
|
rev: 2.1.0
|
|
hooks:
|
|
- id: bashate
|
|
args: ["-iE006,E044", "-eE005,E042"]
|
|
name: bashate
|
|
description: This hook runs bashate for linting shell scripts
|
|
entry: bashate
|
|
language: python
|
|
types: [shell]
|
|
- repo: https://github.com/PyCQA/doc8
|
|
rev: v1.1.2
|
|
hooks:
|
|
- id: doc8
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.7.3
|
|
hooks:
|
|
- id: ruff
|
|
args: ['--fix', '--unsafe-fixes']
|