Add lint toolchain, generate the index page, and correct Legacy Code examples - #53
Closed
megabyde wants to merge 3 commits into
Closed
Add lint toolchain, generate the index page, and correct Legacy Code examples#53megabyde wants to merge 3 commits into
megabyde wants to merge 3 commits into
Conversation
Add prettier and markdownlint-cli2 behind `make check`, plus the reformat and the two long-line and heading-level fixes they require in the Legacy Code decks. Build `_site/index.html` from the README curriculum through a pandoc template and Lua filter instead of maintaining a second copy by hand, and stop tracking the generated output. Replace the `**/*.md` deck glob, which relies on globstar that GNU make does not implement, with a find that keeps decks at any depth.
Drop the blanket workflow permissions in favour of per-job grants, so only the deploy job holds `pages: write` and `id-token: write`. Run `make check` as a job that build depends on, so a lint failure stops the deployment on pushes to main and not only on pull requests. Serialize the deploy job on a `pages` concurrency group to stop overlapping pushes racing each other. Add CODEOWNERS and a monthly Dependabot schedule for npm and actions.
Wrap Class demonstrated inheritance rather than wrapping. Hold the legacy Engine in the wrapper and delegate to it, and correct the comparison table row that described the technique as subclassing. The sprouting kata told readers not to modify the original method, which sprouting cannot satisfy; ask for the minimal call site change instead. The C++ singleton compared a pointer against `null`. The invoice characterization test expected 1850.95 where the shown calculator returns 2132.10. The tax characterization test asserted against values it had just computed from the same calculator, which passes whatever the behaviour is; record the expected outputs instead. Point the Advanced TDD C++ Mars Rover link at the C++ repository, and link the SOLID foundations worksheet, which was rendered but unreachable.
This was referenced Aug 16, 2026
Member
Author
|
Superseded by three stacked PRs, one per commit, so the course-content corrections can be reviewed on their own rather than alongside the tooling:
Same commits, same final tree. Merge in order; GitHub retargets each to |
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.
Three commits, each passing
make checkon its own. Review them separately; the first two are mostly mechanical and the third is the one that changes what the decks teach.build:lint toolchain and generated index pageAdds prettier and markdownlint-cli2 behind
make check, with the reformat they produce across the Legacy Code decks. Two long Exercise bullets are split and one heading is demoted from###to##to satisfy MD013 and MD001._site/index.htmlis no longer maintained by hand. It is built from the README Curriculum section throughindex.template.htmlandindex.lua, so the tables in the README are the only place the curriculum is edited. The generated file is untracked and_site/is ignored. The Lua filter keeps the Curriculum section, rewrites*.md#anchordeck links to.pdf, and reapplies the Bootstrap table classes; it fails the build if the Curriculum heading ever goes missing rather than publishing an empty page.The generated page has an identical link set and row count to the previous hand-written one. Two cosmetic differences: pandoc's
smartextension produces typographic quotes, matching what the beamer decks already do, and headings pick up anchor ids.The deck glob
$(wildcard **/*.md)relied on globstar, which GNU make does not implement, so it silently meant*/*.md. It is now afindwith-mindepth 2, which keepsREADME.mdout and picks up decks at any depth.ci:deploy gating and workflow permissionsBlanket workflow permissions are replaced by per-job grants, so only
deployholdspages: writeandid-token: write.buildnow depends onlint, so a failingmake checkstops the deployment on pushes to main and not only on pull requests.deploygets apagesconcurrency group so overlapping pushes cannot race. The group is job-level rather than workflow-level on purpose: this workflow also runs lint and build on pull requests, and a shared group would queue those against deployments.npm ciwith a committed lockfile replacesnpm install --no-package-lock, which left transitive dependencies floating and hid them from Dependabot.actions/configure-pagesis dropped: nothing consumed its outputs andpage_urlcomes fromdeploy-pages.Adds CODEOWNERS and a monthly Dependabot schedule for npm and actions.
fix:Legacy Code examples and curriculum linksLoggingEngine(Engine)subclassed the legacy class and calledsuper(). It now holds an injectedEngineand delegates. The comparison table row that described the technique asSubclassis corrected toWrapper.null. Nownullptr.Not included
Actions are pinned to tags rather than commit SHAs, and the site still loads Bootstrap 3.3.7 from a CDN with SRI intact. Both are deliberate, and neither is a change I would fold into this branch.