From df3d5d78d68805a04f2dcaf7dd40b4fc4b716ed2 Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Tue, 12 May 2026 16:53:22 +0200 Subject: [PATCH] build(preflight): add csharpier and markdownlint blocks (G1) Block E runs 'dotnet csharpier check' against the HellionChat/ tree, catching reflow drift before push. Block F runs markdownlint-cli2 over the repo's *.md files; MD036 is disabled because forge-post bodies use bold emphasis as section headings (the auto-announce workflow renders those as Discord embeds, so the bold pattern is required). The .claude directory is excluded from the lint scope to match its gitignore status. .markdownlint.json also gains MD024 with siblings_only:true so per-release '### Internal' sub-headers in CHANGELOG.md don't trip the rule across sibling H2 sections. --- .markdownlint.json | 2 ++ scripts/preflight.sh | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.markdownlint.json b/.markdownlint.json index 8f989cf..085bab1 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,7 +1,9 @@ { "MD007": { "indent": 4 }, "MD013": false, + "MD024": { "siblings_only": true }, "MD029": false, "MD033": false, + "MD036": false, "MD041": false } diff --git a/scripts/preflight.sh b/scripts/preflight.sh index adc53bf..280858f 100755 --- a/scripts/preflight.sh +++ b/scripts/preflight.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash # preflight.sh — pre-push gate. Blocks A/B/C verify config drift; Block D is a -# headless `dotnet build` to catch compile-time API drift. Test execution lives -# in the local Build-Suite repo and is NOT part of this preflight. +# headless `dotnet build` to catch compile-time API drift; Block E runs +# `dotnet csharpier check` against HellionChat/; Block F runs markdownlint +# against the repo's *.md files. Test execution lives in the local Build-Suite +# repo and is NOT part of this preflight. set -euo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" @@ -19,4 +21,12 @@ echo "==> preflight: Block C — changelog sync" echo "==> preflight: Block D — plugin compile health" dotnet build HellionChat/HellionChat.csproj --configuration Release --nologo --verbosity quiet +echo "==> preflight: Block E — csharpier reflow check" +dotnet csharpier check HellionChat/ + +echo "==> preflight: Block F — markdownlint" +# npx --yes avoids a global install; first run caches into ~/.npm/_npx/. +# Subsequent runs are sub-second. +npx --yes markdownlint-cli2 "**/*.md" "#node_modules" "#bin" "#obj" "#.claude" + echo "==> preflight: ALL GREEN"