Update precheck to only run on qmd + bib files

This commit is contained in:
Vijay Janapa Reddi
2025-02-03 23:57:53 -05:00
parent acabe3b5d0
commit 75720f9ee8
67 changed files with 1388 additions and 1372 deletions

21
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,21 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace # Removes extra spaces
files: &files ^contents/.*\.(qmd|bib)$ # Restrict to .qmd and .bib files in contents/
- id: end-of-file-fixer # Ensures a newline at EOF
files: *files
- id: check-yaml # Checks YAML syntax
files: *files
- repo: local
hooks:
- id: test-custom-script
name: Run test script
entry: scripts/test-script.sh
language: system
types: [file]
files: *files # Reusing the same directory constraint