Skip to content

Add dotnet format to CI for C# code style validation#138

Merged
lex57ukr merged 1 commit intomainfrom
135-add-dotnet-format-to-ci
Feb 1, 2026
Merged

Add dotnet format to CI for C# code style validation#138
lex57ukr merged 1 commit intomainfrom
135-add-dotnet-format-to-ci

Conversation

@lex57ukr
Copy link
Contributor

@lex57ukr lex57ukr commented Feb 1, 2026

Summary

Enforces .editorconfig compliance for C# code by adding dotnet format verification to CI. Code style violations are now caught automatically before merge, ensuring consistent formatting across the codebase.

Related Issues

Fixes #135

Changes

  • Add dotnet format --verify-no-changes step to CI lint job
  • Add lint-dotnet and lint-dotnet-fix targets to Makefile
  • Fix existing code style violations in 25 C# files
  • Align .editorconfig ReSharper settings with Roslyn formatter defaults
  • Update documentation in CLAUDE.md and CONTRIBUTING.md

- Fix existing code style violations in 25 C# files
- Add dotnet format step to CI lint job with .NET setup
- Add lint-dotnet and lint-dotnet-fix targets to Makefile
- Update .editorconfig to align Rider with dotnet format
- Update CLAUDE.md and CONTRIBUTING.md documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lex57ukr lex57ukr added the enhancement New feature or request label Feb 1, 2026
Copilot AI review requested due to automatic review settings February 1, 2026 23:08
@lex57ukr lex57ukr added the enhancement New feature or request label Feb 1, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enforces C# code style consistency by integrating dotnet format validation into the CI pipeline. It addresses existing formatting violations and updates documentation to reflect the new linting requirements.

Changes:

  • Added dotnet format --verify-no-changes to CI lint job to catch formatting violations automatically
  • Created Makefile targets (lint-dotnet, lint-dotnet-fix) for local C# formatting validation and fixes
  • Fixed code style violations across 25 C# files and aligned .editorconfig ReSharper settings with Roslyn defaults

Reviewed changes

Copilot reviewed 10 out of 31 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/ci.yml Added dotnet format verification step to CI lint job
Makefile Added lint-dotnet and lint-dotnet-fix targets for C# formatting
CONTRIBUTING.md Updated contribution guidelines to include C# formatting requirements
CLAUDE.md Added dotnet format documentation and tool installation instructions
.editorconfig Aligned ReSharper logical not operator spacing with Roslyn defaults
tests/Keystone.Cli.UnitTests/Domain/Policies/EntryModelPoliciesTests.ExcludeUserContent.cs Added missing public access modifier to partial class
tests/Keystone.Cli.UnitTests/Domain/Policies/EntryModelPoliciesTests.ExcludeGitContent.cs Added missing public access modifier to partial class
tests/Keystone.Cli.UnitTests/Domain/Policies/EntryModelPoliciesTests.ExcludeGitAndUserContent.cs Added missing public access modifier to partial class
src/Keystone.Cli/Application/Data/Stores/SyncFileProjectModelStore.cs Reordered using statements alphabetically
keystone-cli.sln.DotSettings Reformatted XML and added spell-check dictionary entries

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lex57ukr lex57ukr merged commit aa734ac into main Feb 1, 2026
5 checks passed
@lex57ukr lex57ukr deleted the 135-add-dotnet-format-to-ci branch February 1, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dotnet format check to CI for C# code style validation

1 participant