-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[None][chore] add a EditorConfig config #6897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Basic formatting such as "no trailing whitespace" will happen when saving the file with [EditorConfig](https://editorconfig.org/) extension. Signed-off-by: Zhenhua Wang <[email protected]>
📝 WalkthroughWalkthroughAdds a root-level .editorconfig defining global formatting rules and language-specific indentation for Makefiles, C/C++, and Python. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
/bot run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (4)
.editorconfig (4)
16-20
: Cover common C/C++ and CUDA headers/sources (cc, cxx, cuh, hpp, etc.).This widens coverage to typical extensions seen in C/C++ and CUDA projects.
-# c++ -[*.{cpp,cu,h}] -indent_style = space -indent_size = 4 +# c/c++ & cuda +[*.{c,cc,cpp,cxx,cu,cuh,h,hh,hpp,hxx,inl,ipp}] +indent_style = space +indent_size = 4
10-13
: Preserve intentional trailing spaces in docs (Markdown/RST) to avoid breaking soft line breaks.Two trailing spaces at end-of-line are meaningful in Markdown; similar concerns often apply to RST.
Insert a docs-specific override:
insert_final_newline = true +# docs +[*.{md,MD,rst,RST}] +trim_trailing_whitespace = false + # make
6-9
: Optional: Set a global indent style to reduce ambiguity.Consider defaulting to spaces globally and overriding only where necessary (e.g., Makefiles). This helps prevent accidental tabs in new files.
[*] end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true +indent_style = space +indent_size = 4
25-25
: Ensure newline at EOF to match insert_final_newline = true.Minor nit: double-check that the file physically ends with a newline.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.editorconfig
(1 hunks)
🔇 Additional comments (3)
.editorconfig (3)
6-9
: Solid global baseline (LF EOL, trim whitespace, final newline).These defaults are sensible and broadly compatible with most tooling.
21-24
: Python section looks good.Matches conventional 4-space indentation; plays fine with Black.
6-24
: No conflicts found — .editorconfig matches repo formatter settingsQuick check summary:
- Only a single .editorconfig at repo root was found (no nested .editorconfig files).
- .clang-format (root) contains IndentWidth: 4, TabWidth: 4, UseTab: Never — aligns with C++ section in .editorconfig (space, indent_size = 4).
- pyproject.toml (root) contains only a line-length = 100 entry (no indentation-related keys found).
- No Prettier, cmake-format, or isort/setup.cfg files detected.
Files checked (evidence from the scan):
- .editorconfig (root) — C++: space, indent_size = 4; Python: space, indent_size = 4
- .clang-format (root) — IndentWidth: 4 (line 44), TabWidth: 4 (line 77), UseTab: Never (line 78)
- pyproject.toml (root) — line-length = 100 (line 107)
- examples/scaffolding/contrib/mcp/{e2b,weather,websearch}/pyproject.toml — present; no indentation-related keys matched by the search
Action: No changes required based on this scan.
PR_Github #15256 [ run ] triggered by Bot |
/bot run |
PR_Github #15366 [ run ] triggered by Bot |
PR_Github #15366 [ run ] completed with state |
Signed-off-by: Zhenhua Wang <[email protected]>
Signed-off-by: Zhenhua Wang <[email protected]> Signed-off-by: Wangshanshan <[email protected]>
Signed-off-by: Zhenhua Wang <[email protected]> Signed-off-by: Wangshanshan <[email protected]>
Signed-off-by: Zhenhua Wang <[email protected]>
Signed-off-by: Zhenhua Wang <[email protected]> Signed-off-by: Wangshanshan <[email protected]>
Signed-off-by: Zhenhua Wang <[email protected]>
Signed-off-by: Zhenhua Wang <[email protected]> Signed-off-by: Wangshanshan <[email protected]>
Basic formatting such as "no trailing whitespace" will happen when saving the file with EditorConfig extension.
Summary by CodeRabbit