mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-02 02:29:16 -05:00
Update precheck to only run on qmd + bib files
This commit is contained in:
21
.pre-commit-config.yaml
Normal file
21
.pre-commit-config.yaml
Normal 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
|
||||
Reference in New Issue
Block a user