From 6a238ca8ade4ac645e22d4fa72d5d7f1290c567b Mon Sep 17 00:00:00 2001 From: Enwei Zhu <21126786+syuoni@users.noreply.github.com> Date: Tue, 16 Dec 2025 18:58:43 +0800 Subject: [PATCH] [None][doc] Update CONTRIBUTING.md (#10023) Signed-off-by: Enwei Zhu <21126786+syuoni@users.noreply.github.com> --- CONTRIBUTING.md | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2d5b42a6a3..e215f3d021 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,33 +8,9 @@ ## Coding Guidelines -* Coding style for TensorRT-LLM can be found [in this document](CODING_GUIDELINES.md). +TensorRT-LLM Coding Style can be found [in this document](CODING_GUIDELINES.md). -* All contributed C++ code should be formatted following the rules in TensorRT-LLM's [clang-format](.clang-format) file. The recommended version is clang-format>=14.0. - -* Changes can be formatted with the following command: - - ```bash - # Commit ID is optional - if unspecified, run format on staged changes. - git-clang-format --style file [commit ID/reference] - ``` - -* All contributed Python code should be formatted using the `black` Python package. The recommended version is `black>=23.0` - -* Changes can be formatted with the following command: - - ```bash - git diff --name-only | grep "*.py" | xargs black -l 120 - ``` - -* Try to keep pull requests (PRs) as concise as possible: - * Avoid committing commented-out code. - * Wherever possible, each PR should address a single concern. If there are several otherwise-unrelated things that should be fixed to reach a desired endpoint, our recommendation is to open several PRs and indicate the dependencies in the description. The more complex the changes are in a single PR, the more time it will take to review those changes. - -## Coding Style - -We use `pre-commit` for automatic code formatting and validation. Install the `pre-commit` package in your local -Python environment. +We use `pre-commit` for automatic code formatting and validation. Install the `pre-commit` package in your local Python environment. ```bash pip install pre-commit @@ -73,6 +49,9 @@ mdformat.................................................................Passed If any files were modified by this hook, you will need to stage and commit them again. +In addition, please try to keep pull requests (PRs) as concise as possible: +* Avoid committing commented-out code. +* Wherever possible, each PR should address a single concern. If there are several otherwise-unrelated things that should be fixed to reach a desired endpoint, our recommendation is to open several PRs and indicate the dependencies in the description. The more complex the changes are in a single PR, the more time it will take to review those changes. ## Pull Requests