Skip to content

Add linting - #14

Merged
kryptt merged 6 commits into
masterfrom
add-linting
Sep 3, 2026
Merged

kryptt merged 6 commits into
masterfrom
add-linting

Conversation

@kryptt

@kryptt kryptt commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-03 23:43 UTC

- .pre-commit-config.yaml: hygiene checks, codespell, markdownlint-cli2
  (pinned; local node hook), and a 72-char pane-width check for the
  refactoring samples (pages/refactorings/*.scala|.hs).
- .markdownlint-cli2.yaml: shared markdown style (80-col prose, tables
  and headings exempt, compact pipe style allowed).
- scripts/check-sample-width.sh: enforces the sample width rule the
  refactoring skill already documents (LESSONS.md 'pane width').
- .github/workflows/lint.yml: runs the same pre-commit config on every
  PR and push to master, so local and CI can't drift.
- Fixes the pre-existing issues the new rules surface: a duplicated H1
  and trailing-punctuation headings in the Refactorings post, trailing
  whitespace, long prose lines in about/libraries/README, a folded
  header_subtitle scalar, and a 'Vist' typo (Visit).
Same checks, Ruby toolchain:
- .overcommit.yml + .git-hooks/pre_commit/*.rb: hygiene checks
  (trailing whitespace, final newline, YAML/JSON syntax, merge markers,
  case conflicts, executable/shebang consistency), codespell, mdl
  (markdownlint), and the 72-char pane-width check for refactoring samples.
- .mdlrc + mdl_style.rb: mdl config (front-matter, git-recurse, MD013
  80-col prose, MD029 ordered, MD026 punctuation like markdownlint).
- scripts/lint.sh = bundle exec overcommit --run; CI runs it, so local
  and CI can't drift. Gemfile dev group: overcommit + mdl.
- Removes .pre-commit-config.yaml, .markdownlint-cli2.yaml,
  scripts/check-sample-width.sh.
- Wraps a few long prose lines for the 80-col rule.
- Gemfile: add spellr (~> 0.12).
- .git-hooks/pre_commit/spellr.rb: overcommit hook running bundle exec
  spellr on the committed files.
- .spellr.yml + .spellr_wordlists/english.txt: config and site wordlist.
- .overcommit.yml: Codespell -> Spellr hook.
- .github/workflows/lint.yml: drop the pip codespell install (everything
  is now Ruby/bundler).
- scripts/lint.sh: export OVERCOMMIT_NO_VERIFY for fresh checkouts (CI).
- README: document spellr + wordlist.
The rebase onto master (Refactoring Section #12) brought in the
refactorings catalogue, its raw-HTML citation blocks, and the internal
.claude/skills/refactoring-entry docs. Tune the lint config for what is
site content vs. tooling:

- mdl_style.rb: allow inline HTML (MD033) — the refactorings citations
  are raw-HTML <li> lines by design (kramdown won't process markdown
  inside raw block HTML).
- .overcommit.yml Mdl: exclude pages/refactorings/**/* (same reason;
  unwrappable citation lines), pages/refactorings.md, and
  .claude/**/* (agent-internal docs, not site prose). Overcommit
  excludes use File.fnmatch, so '**' needs the trailing '/*'.
- .git-hooks/pre_commit/spellr.rb: also skip .claude/, refactorings,
  scala/hs/js, run.sh, and dotfiles when overcommit passes absolute
  paths; spellr only honors .spellr.yml excludes when given no files.
- .spellr.yml + wordlist: exclude the same non-prose trees; wordlist
  refactorings/catalogue/opdyke/fowler/kramdown.
- pages/refactorings/extract-method.md: drop the trailing blank lines.
Overcommit enables AuthorName and AuthorEmail pre-commit hooks by default,
which check git config user.name and user.email. In GitHub Actions runners,
these are unset, causing overcommit --run to fail in CI.
The hook should only enforce that files end with a newline (preventing
POSIX/git missing-newline errors), not fail on multiple trailing blank
lines which occurs naturally in source files like Optics.hs.
@kryptt
kryptt merged commit e7d79df into master Sep 3, 2026
2 checks passed
@kryptt
kryptt deleted the add-linting branch September 3, 2026 23:42
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.

1 participant