Skip to content

chore: sync tooling and helper improvements from HoldFast#24

Merged
codepuncher merged 4 commits into
mainfrom
chore/sync-from-holdfast
Jun 20, 2026
Merged

chore: sync tooling and helper improvements from HoldFast#24
codepuncher merged 4 commits into
mainfrom
chore/sync-from-holdfast

Conversation

@codepuncher

@codepuncher codepuncher commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Backports mod-agnostic infrastructure that diverged in the HoldFast downstream mod, plus a richer starter Utils.h.

Tooling / CI

  • Markdown quality tooling — adds dprint formatting + Vale prose linting (dprint.json, .vale.* with a generic Project style), a markdown job in lint.yml, and dprint/vale pre-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 the numpy dependency (Pillow-only radial vignette) and warns when a title overflows at minimum font size.
  • CMakeLists.txt — replaces the cached DEPLOY_DIR with DEPLOY_DIR_OVERRIDE, recomputing the deploy path every configure so environment changes take effect (with a stale-cache warning).
  • CI — pins windows-2022, runs paths-filter on all events, drops unused actions: write permissions (ci + release), and lint.yml now also lints Markdown.
  • lefthook — also runs clang-format over test/ sources.
  • nexus-upload.yml — bumps Nexus-Mods/upload-action to beta.7 and enables mod-manager download flags.

Starter helpers

Expands src/Utils.h from a single FormatVersion demo into a small, generic, unit-tested utility belt: TrimWhitespace, AsciiToLower, CaseInsensitiveEqual, and ClampOrDefault (generalised from HoldFast's domain-specific clamp). Catch2 tests ported in test/ExampleTests.cpp.

Verification

  • Banner renders correctly without numpy.
  • generate-nexus-page.py compiles; all workflow/lefthook YAML parses.
  • dprint check and vale pass clean.
  • Utils.h helpers compiled and all assertions run under clang++ -std=c++23 -Wall -Wextra.

Copilot AI review requested due to automatic review settings June 20, 2026 11:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.h and 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.

Comment thread src/Utils.h
Comment thread .github/workflows/nexus-upload.yml Outdated
@codepuncher
codepuncher force-pushed the chore/sync-from-holdfast branch from 36438fb to 387da75 Compare June 20, 2026 11:43
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
codepuncher force-pushed the chore/sync-from-holdfast branch from 387da75 to 7e027e6 Compare June 20, 2026 11:55
- 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
Copilot AI review requested due to automatic review settings June 20, 2026 12:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/nexus-upload.yml Outdated
Comment thread src/Utils.h
- 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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Comment thread scripts/generate-nexus-page.py

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.

@codepuncher
codepuncher merged commit 54ef21b into main Jun 20, 2026
14 checks passed
@codepuncher
codepuncher deleted the chore/sync-from-holdfast branch June 20, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants