Files
grian-ui/.pre-commit-config.yaml
Sean Mooney 8346769c9b set up basic unittesting
this chnage setup up unit testing with
stestr as the test runner and
django.test.SimpleTestCase as the base of our tests.

This avoid the depency on manage.py or run_tests.sh

Change-Id: Ib39d20861928a3052eaa9e9adc3f984ae20aad03
2025-05-19 23:51:57 +00:00

78 lines
1.7 KiB
YAML

exclude: '^docs/conf.py'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# whitespace
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args: ['--fix=lf']
exclude: '.*\.(svg)$'
- id: check-byte-order-marker
# file format and permissions
- id: check-ast
- id: check-json
- id: check-xml
- 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
# python
- id: debug-statements
- id: check-docstring-first
- id: requirements-txt-fixer
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: remove-tabs
exclude: '.*\.(svg)$'
- repo: https://github.com/PyCQA/bandit
rev: 1.8.3
hooks:
- id: bandit
- repo: https://opendev.org/openstack/bashate
rev: 2.1.1
hooks:
- id: bashate
args: ["--max-line-length", "150"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.11.2
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]
- repo: https://github.com/PyCQA/doc8
rev: v1.1.2
hooks:
- id: doc8
- repo: https://opendev.org/openstack/hacking
rev: 7.0.0
hooks:
- id: hacking
additional_dependencies:
- flake8-import-order~=0.18.2
exclude: '^(doc|releasenotes|tools)/.*$'
- repo: "https://github.com/TotallyNotRobots/check-spdx-header"
rev: '0.1.0'
hooks:
- id: fix-spdx-header