chore: add pre-commit hook bundle (prek-compatible)#67
Merged
Conversation
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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.
Summary
.pre-commit-config.yamlwith the standard hygiene bundle (line endings, trailing whitespace, EOF newlines, YAML/JSON/private-key checks), markdownlint, codespell, and a local CSharpier hook.MD013off — no prose wrapping;MD024off — duplicate headings allowed in changelogs;MD033off — README uses inline HTML)..codespellrcwith sensible skip patterns.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 withdotnet tool restore+prek install -f+prek run --all-files.Notes
--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-warnaserrorbuild.prek run --all-filessweep (trailing whitespace, EOL newlines). Worth doing as a separate cleanup PR if any failures show up.