mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-03-11 17:49:25 -05:00
Add table formatting check to pre-commit hooks
- Validates table alignment (text=left, numbers=right) - Checks header and first column bolding - Ensures proper spacing and structure - Runs on all .qmd files in quarto/contents/ - Exits with code 1 if formatting issues found
This commit is contained in:
@@ -165,6 +165,16 @@ repos:
|
||||
pass_filenames: true
|
||||
files: ^quarto/contents/.*\.qmd$
|
||||
|
||||
# --- Table Formatting Validation ---
|
||||
- id: check-table-formatting
|
||||
name: "Check table formatting (alignment, bolding, spacing)"
|
||||
entry: python tools/scripts/format_tables.py --check -d quarto/contents/
|
||||
language: python
|
||||
additional_dependencies: []
|
||||
pass_filenames: false
|
||||
files: ^quarto/contents/.*\.qmd$
|
||||
description: "Ensure all tables have proper bolding, alignment, and spacing"
|
||||
|
||||
# --- Part Key Validation ---
|
||||
- id: validate-part-keys
|
||||
name: "Validate part keys in .qmd files"
|
||||
|
||||
Reference in New Issue
Block a user