Feature/dotnet format ci#46
Merged
CritasWang merged 2 commits intofix_session_pool_leakfrom Feb 6, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces automated code formatting enforcement using dotnet format in the CI pipeline, replacing the previous pre-commit-based approach with a simpler, more direct solution. The changes standardize code style across the C# codebase according to .editorconfig rules.
Changes:
- Simplified CI workflow by replacing Python/pre-commit setup with direct
dotnet formatcommand - Added Thrift-generated code exclusion in .editorconfig to prevent formatting checks on auto-generated files
- Applied formatting fixes including using directive ordering and trailing whitespace cleanup
- Added comprehensive documentation in both English and Chinese READMEs explaining formatting commands and CI requirements
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/pre-commit-format.yml | Streamlined workflow to use dotnet format directly instead of pre-commit, reducing complexity and dependencies |
| .editorconfig | Added exclusion for Thrift-generated code to prevent formatting checks on auto-generated files |
| README.md | Added "Code Formatting" section documenting how to check and fix formatting locally |
| README_ZH.md | Added Chinese translation of code formatting documentation |
| src/Apache.IoTDB/SessionPool.cs | Applied formatting: reordered using directives (System.Security.Cryptography.X509Certificates moved to proper alphabetical position) and removed trailing whitespace |
| src/Apache.IoTDB/Rpc/TSStatusCode.cs | Removed trailing whitespace at end of file |
| src/Apache.IoTDB/PoolHealthMetrics.cs | Removed trailing whitespace |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.