chore: sync tooling and helper improvements from HoldFast#24
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR backports template/tooling improvements from the HoldFast downstream project, and expands the starter Utils.h into a small unit-tested utility set intended to be usable without CommonLibSSE.
Changes:
- Add unit-tested, CommonLibSSE-free helpers to
src/Utils.hand expand Catch2 tests. - Improve Nexus-page generation and banner rendering scripts (BBCode conversion, Pillow-only vignette, better warnings).
- Sync CI/linting/tooling (Vale + dprint + lefthook updates, workflow permission tightening, Windows runner pinning, deploy dir override behavior).
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
test/ExampleTests.cpp |
Adds Catch2 coverage for new Utils.h helpers. |
src/Utils.h |
Introduces reusable string helpers and float sanitization/clamping utilities. |
scripts/generate-nexus-page.py |
Extends Markdown→BBCode conversion to handle fenced code blocks and pipe tables; tightens link regex. |
scripts/banner.py |
Removes numpy dependency and adds overflow warning when the title can’t fit. |
README.md |
Formatting/spacing tweaks and updates CI documentation table (Markdown table formatting). |
lefthook.yml |
Extends clang-format to test/ and adds dprint + Vale hooks for Markdown. |
dprint.json |
Adds dprint Markdown formatting configuration for README.md and docs/**/*.md. |
CMakeLists.txt |
Replaces cached deploy dir with DEPLOY_DIR_OVERRIDE and recomputes deploy path each configure. |
.vale/styles/Project/LinkText.yml |
Adds a Vale rule discouraging non-descriptive link text. |
.vale/styles/Project/Capitalization.yml |
Adds capitalization substitutions (e.g., “GitHub Actions”). |
.vale/styles/Project/AvoidVague.yml |
Adds a Vale rule flagging vague wording (e.g., “simply”). |
.vale/styles/Project/Acronyms.yml |
Adds acronym substitutions (e.g., “PR”, “CI”). |
.vale/styles/config/vocabularies/Project/reject.txt |
Adds rejected vocabulary entries for Vale. |
.vale/styles/config/vocabularies/Project/accept.txt |
Adds accepted vocabulary entries for Vale. |
.vale.ini |
Configures Vale to lint Markdown using the new Project style and token ignores. |
.github/workflows/release.yml |
Pins runner to windows-2022 and tightens permissions. |
.github/workflows/nexus-upload.yml |
Updates Nexus upload action version and adjusts checkout/ref behavior + mod-manager flags. |
.github/workflows/lint.yml |
Adds Markdown lint job (dprint + Vale) and broadens triggers. |
.github/workflows/ci.yml |
Pins Windows runner, adjusts permissions, and refines path-filter usage + checkout behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
codepuncher
force-pushed
the
chore/sync-from-holdfast
branch
from
June 20, 2026 11:43
36438fb to
387da75
Compare
Backport mod-agnostic infrastructure that diverged in the HoldFast downstream mod: - Add Markdown quality tooling: dprint formatting + Vale prose linting (dprint.json, .vale.*, lint.yml markdown job, lefthook hooks) - nexus-page generator: handle fenced code blocks and pipe tables, tighten the URL regex - banner.py: drop the numpy dependency (Pillow-only vignette) and warn on title overflow - CMakeLists: replace cached DEPLOY_DIR with DEPLOY_DIR_OVERRIDE that recomputes every configure so env changes take effect - CI: pin windows-2022, run paths-filter on all events, drop unused actions: write permission - lefthook: also clang-format test/ sources - nexus-upload: bump upload-action to beta.7, handle dispatch ref, enable mod-manager download flags Also expand the starter src/Utils.h with generic, tested helpers (TrimWhitespace, AsciiToLower, CaseInsensitiveEqual, ClampOrDefault) and matching Catch2 tests.
codepuncher
force-pushed
the
chore/sync-from-holdfast
branch
from
June 20, 2026 11:55
387da75 to
7e027e6
Compare
- Document that TrimWhitespace returns a view into its input, so callers must keep the source buffer alive (no temporaries) - nexus-upload: fall back to github.ref on workflow_dispatch instead of an empty ref for clarity
- nexus-upload: check out the v<version> tag for both release and workflow_dispatch so cliff notes and the downloaded artifact always come from the released revision (reverts to the original tag-based ref) - Utils: document the ClampOrDefault bounds precondition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports mod-agnostic infrastructure that diverged in the HoldFast downstream mod, plus a richer starter
Utils.h.Tooling / CI
dprint.json,.vale.*with a genericProjectstyle), amarkdownjob inlint.yml, anddprint/valepre-commit hooks.generate-nexus-page.py— handles fenced code blocks ([code]) and Markdown pipe tables ([list]), and tightens the URL→BBCode regex.banner.py— drops thenumpydependency (Pillow-only radial vignette) and warns when a title overflows at minimum font size.CMakeLists.txt— replaces the cachedDEPLOY_DIRwithDEPLOY_DIR_OVERRIDE, recomputing the deploy path every configure so environment changes take effect (with a stale-cache warning).windows-2022, runspaths-filteron all events, drops unusedactions: writepermissions (ci + release), andlint.ymlnow also lints Markdown.test/sources.nexus-upload.yml— bumpsNexus-Mods/upload-actionto beta.7 and enables mod-manager download flags.Starter helpers
Expands
src/Utils.hfrom a singleFormatVersiondemo into a small, generic, unit-tested utility belt:TrimWhitespace,AsciiToLower,CaseInsensitiveEqual, andClampOrDefault(generalised from HoldFast's domain-specific clamp). Catch2 tests ported intest/ExampleTests.cpp.Verification
generate-nexus-page.pycompiles; all workflow/lefthook YAML parses.dprint checkandvalepass clean.Utils.hhelpers compiled and all assertions run underclang++ -std=c++23 -Wall -Wextra.