Add bullet spacing check to pre-commit hooks

- Updated fix_bullet_spacing.py with --check mode for CI validation
- Added book-fix-bullet-spacing hook to auto-fix missing blank lines
  before bullet lists during commits
- Script now provides clear error messages with line numbers
This commit is contained in:
Vijay Janapa Reddi
2026-02-01 22:18:19 -05:00
parent 6a343e8767
commit f94e5514cf
2 changed files with 92 additions and 20 deletions

View File

@@ -104,6 +104,13 @@ repos:
pass_filenames: true
files: ^book/quarto/contents/.*\.qmd$
- id: book-fix-bullet-spacing
name: "Book: Fix bullet list spacing (blank line before lists)"
entry: python book/tools/scripts/utilities/fix_bullet_spacing.py
language: python
pass_filenames: true
files: ^book/quarto/contents/.*\.qmd$
- id: book-validate-json
name: "Book: Validate JSON files"
entry: python book/tools/scripts/utilities/validate_json.py