Project editing and testing configuration bumpf

This commit is contained in:
Jonathan Harker 2024-09-20 16:32:35 +12:00
parent 4011c1fa47
commit 2e4b981aa7
8 changed files with 139 additions and 0 deletions

30
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,30 @@
fail_fast: false
repos:
# Are we accidentally committing secrets, keys, credentials, etc.?
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
hooks:
- id: gitleaks
# Check for simple quick low-hanging fruit
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
# Does it parse?
- id: check-ast
- id: check-json
- id: check-toml
- id: check-yaml
# Have we accidentally left merge markers in?
- id: check-merge-conflict
# Fix BOM, EOF whitespace
- id: fix-byte-order-marker
- id: end-of-file-fixer
# Auto-format some non-controversial PEP8 things
- repo: https://github.com/hhatto/autopep8
rev: v2.3.1
hooks:
- id: autopep8
# fix blank lines between classes and funcs, import lines, trailing whitespace
args: ["--in-place", "--select", "E301,E302,E303,E304,E305,E306,E401,W291,W292,W293,W391"]