Skip to content

chore: add pre-commit hook bundle (prek-compatible)#67

Merged
daniel3303 merged 1 commit into
masterfrom
chore/pre-commit-hooks
May 14, 2026
Merged

chore: add pre-commit hook bundle (prek-compatible)#67
daniel3303 merged 1 commit into
masterfrom
chore/pre-commit-hooks

Conversation

@daniel3303
Copy link
Copy Markdown
Owner

Summary

  • Adds .pre-commit-config.yaml with the standard hygiene bundle (line endings, trailing whitespace, EOF newlines, YAML/JSON/private-key checks), markdownlint, codespell, and a local CSharpier hook.
  • Configures markdownlint with relaxed rules (MD013 off — no prose wrapping; MD024 off — duplicate headings allowed in changelogs; MD033 off — README uses inline HTML).
  • Adds .codespellrc with sensible skip patterns.
  • Documents install/run in the README's new Contributing section.

Code changes

  • .pre-commit-config.yaml — new hook configuration.
  • .markdownlint.yaml — relaxed rules so existing README passes.
  • .codespellrc + .codespellignore — typo checker config and empty allowlist.
  • README.md — new "Contributing" section with dotnet tool restore + prek install -f + prek run --all-files.

Notes

  • Hooks are developer convenience (skippable via --no-verify). The hard gate is the CI lint job (PR ci: split into lint + build matrix with warnings-as-errors #66) which runs the equivalent CSharpier check and -warnaserror build.
  • Existing files may need a one-time prek run --all-files sweep (trailing whitespace, EOL newlines). Worth doing as a separate cleanup PR if any failures show up.

Adds .pre-commit-config.yaml wiring up:
  - pre-commit-hooks: no-commit-to-master, line endings, trailing whitespace,
    end-of-file, large-file/merge-conflict/yaml/json/private-key checks
  - markdownlint-cli with relaxed prose rules (.markdownlint.yaml)
  - codespell typo checker (.codespellrc + empty .codespellignore)
  - local CSharpier check via dotnet csharpier

Plus a README 'Contributing' section documenting prek install/run.

Hooks are dev-side convenience; the CI lint job is the hard gate.
@daniel3303 daniel3303 merged commit ff6f98d into master May 14, 2026
@daniel3303 daniel3303 deleted the chore/pre-commit-hooks branch May 14, 2026 11:34
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.56%. Comparing base (205e71c) to head (e589006).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #67   +/-   ##
=======================================
  Coverage   99.56%   99.56%           
=======================================
  Files          25       25           
  Lines        1157     1157           
  Branches      128      128           
=======================================
  Hits         1152     1152           
  Misses          1        1           
  Partials        4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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