build: add editorconfig, analyzers and CI formatting check#7
Merged
Conversation
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.
What
Introduces code style and linting tooling integrated with the build.
Tooling
.editorconfig— style rules aligned to the existing conventions (file-scoped namespaces, usings outside the namespace, 4-space indent,var/expression-bodied/collection-expression preferences). EF Core migrations are excluded as generated code.Directory.Build.props— enables .NET analyzers +EnforceCodeStyleInBuildfor all projects as warnings (conservative profile: surfaces issues without breaking the build)..github/workflows/ci.yml— runs on pull requests tomaster: restore →dotnet format whitespace --verify-no-changes→ Release build.Normalization applied
Why
There was no formatter or linter wired into the build, so style drift wasn't caught anywhere. This adds a predictable, low-friction gate.
Notes for reviewers
dotnet format whitespace). Fulldotnet formatwas deliberately avoided because its analyzer pass applied unwanted semantic rewrites (e.g. makingDbSet<>properties nullable). The analyzers still run duringdotnet buildas informational warnings.end_of_lineis intentionally not enforced in.editorconfigand the existing.gitattributesis untouched, to avoid fighting Git's autocrlf on Windows.🤖 Generated with Claude Code