From 8710e3f9f6964f0adbf565c3a57de1732d82ffb5 Mon Sep 17 00:00:00 2001 From: Bill Little Date: Wed, 15 Mar 2023 16:12:11 +0000 Subject: [PATCH] update and add new pre-commit git-hooks --- .pre-commit-config.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5df8321aa..4dd64fee4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,11 +3,27 @@ ci: autoupdate_schedule: 'quarterly' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v4.0.1" + rev: "v4.4.0" hooks: + # Prevent giant files from being committed - id: check-added-large-files + # Check whether files parse as valid Python + - id: check-ast + # Check for files that contain merge conflict strings + - id: check-merge-conflict + # Attempts to load all TOML files to verify syntax + - id: check-toml + # Attempts to load all yaml files to verify syntax + - id: check-yaml + # Check for debugger imports and py37+ breakpoint() calls in python source + - id: debug-statements + # Makes sure files end in a newline and only a newline - id: end-of-file-fixer + # Replaces or checks mixed line ending - id: mixed-line-ending + # Protect specific branches from direct checkins (main) + - id: no-commit-to-branch + # Trims trailing whitespace - id: trailing-whitespace - repo: https://github.com/pycqa/flake8 rev: "3.9.2"