Files
InstanceBrick--nightcap/lefthook.yml
T
vii fd364a7bf2 docs: wrap the changelog at 110 columns and drop the glyphs roadmap item
Add a pre-commit check for added changelog lines over 110 characters. Roblox has no Nintendo glyph set, so the roadmap item cannot be met.
2026-10-09 13:50:46 -05:00

29 lines
988 B
YAML

# Local git hooks. Install once with: lefthook install
# Mirrors the "Repository contracts" job in .github/workflows/ci.yml.
pre-commit:
parallel: true
commands:
shell-syntax:
glob: "{scripts,tests,packaging}/**/*.sh"
run: for f in {staged_files}; do bash -n "$f" || exit 1; done
json:
glob: "{config,packaging}/**/*.json"
run: for f in {staged_files}; do jq empty "$f" || exit 1; done
desktop-entry:
glob: "*.desktop"
run: desktop-file-validate {staged_files}
changelog-width:
glob: "CHANGELOG.md"
run: >-
git diff --cached -U0 -- CHANGELOG.md |
awk '/^\+[^+]/ && length($0) > 111 { print "CHANGELOG.md: added line over 110 characters: " substr($0, 2); bad = 1 } END { exit bad }'
pre-push:
commands:
packaging-contracts:
run: >-
bash tests/managed_payload_build_contract_test.sh . &&
bash tests/flatpak_packaging_test.sh . &&
bash tests/native_packaging_test.sh .