Maintenance¶
Updating Tool Versions¶
Re-run setup.sh to update all tools to latest versions:
Adding a New Language¶
- Add entry to
config/hooks.json→languagessection - Add file matching in
hooks/pre-commit(format + lint blocks) - Add extensions to
config/license-templates.jsonif headers apply - Add editor rules to
.editorconfig - Add install steps to
setup.sh - Add lint config to
Tools/Git/Lint/settings.json - Document in
docs/config-reference.md
Adding a New Repo to void-filter¶
Option A: Set hooks path (recommended)¶
Option B: Use install script¶
Modifying Lint Rules¶
C/C++ (.clang-format.yml)¶
- Edit
.clang-format.ymlin void-filter - Test:
clang-format --style=file:path/to/.clang-format.yml test.cpp - Consider coordinating a "reformat" commit if rules change significantly
Python (ruff.toml)¶
Edit ruff.toml. Changes apply immediately on next commit.
Go¶
Go formatting is handled by gofmt/goimports no configuration needed.
Troubleshooting¶
| Issue | Fix |
|---|---|
| Hook not running | Check: git config core.hooksPath should point to void-filter/hooks |
| "clang-format not found" | Re-run sudo ./setup.sh /path/to/project |
| "ruff not found" | pip install ruff (may need --break-system-packages on Ubuntu 23+) |
| Hook too slow | Check config/hooks.json disable checks you don't need |
| Skip hooks once | git commit --no-verify |
Architecture¶
hooks/ → Bash scripts (entry points for git)
config/ → JSON configuration (hooks.json, license-templates.json)
Tools/Git/Lint/ → Python lint engine (legacy, still functional)
Tools/Git/Headers/ → Python header engine (legacy, still functional)
Tools/Git/Util/ → Shared Python utilities
The hooks/ directory is the primary entry point. The Tools/ directory contains
the legacy Python-based lint and header engine which can still be used via the
HookManager Python interface for more complex setups.