Skip to content

Conversation

zhenhuaw-me
Copy link
Member

@zhenhuaw-me zhenhuaw-me commented Aug 14, 2025

Basic formatting such as "no trailing whitespace" will happen when saving the file with EditorConfig extension.

Summary by CodeRabbit

  • Chores
    • Added EditorConfig to enforce consistent formatting across editors (LF line endings, trim trailing whitespace, ensure final newline).
  • Style
    • Standardized indentation: tabs with size 4 for Makefiles; spaces with size 4 for C/C++; spaces with size 4 for Python.
  • Notes
    • No functional changes to the application.

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]>
Copy link
Contributor

coderabbitai bot commented Aug 14, 2025

📝 Walkthrough

Walkthrough

Adds a root-level .editorconfig defining global formatting rules and language-specific indentation for Makefiles, C/C++, and Python.

Changes

Cohort / File(s) Summary
Repository configuration
./.editorconfig
Introduces EditorConfig with global rules (LF EOL, trim trailing whitespace, insert final newline) and language-specific indentation: Makefile* (tabs, size 4), C/C++ (*.cpp, *.cu, .h: spaces, size 4), Python (.py: spaces, size 4).

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
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@zhenhuaw-me zhenhuaw-me self-assigned this Aug 14, 2025
@zhenhuaw-me zhenhuaw-me enabled auto-merge (squash) August 14, 2025 07:40
@zhenhuaw-me
Copy link
Member Author

/bot run

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 5cd8c0f and c69b607.

📒 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 settings

Quick 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.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15256 [ run ] triggered by Bot

@zhenhuaw-me
Copy link
Member Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15366 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15366 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #11587 completed with status: 'SUCCESS'
Pipeline passed with automatic retried tests. Check the rerun report for details.

@zhenhuaw-me zhenhuaw-me merged commit fadb5e7 into NVIDIA:main Aug 15, 2025
5 checks passed
@zhenhuaw-me zhenhuaw-me deleted the editorconfig branch August 15, 2025 07:54
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 17, 2025
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 17, 2025
Signed-off-by: Zhenhua Wang <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 17, 2025
Signed-off-by: Zhenhua Wang <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 17, 2025
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 18, 2025
Signed-off-by: Zhenhua Wang <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 18, 2025
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 18, 2025
Signed-off-by: Zhenhua Wang <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants