Skip to content

Add clang-format to pre-commit config - #4583

Merged
zhyncs merged 1 commit into
sgl-project:mainfrom
Hongbosherlock:clang-format
Mar 19, 2025
Merged

zhyncs merged 1 commit into
sgl-project:mainfrom
Hongbosherlock:clang-format

Conversation

@Hongbosherlock

@Hongbosherlock Hongbosherlock commented Mar 19, 2025 •

Copy link
Copy Markdown
Contributor

Motivation

follow: #4194 and #4203

There is clang-format check in pr-test-sgl-kernel.yml now. If the local code format doesn't meet the requirements, the CI check fails

To avoid manually running clang-format before each commit and to ensure code style consistency with the project, I added clang-format 18 checks to pre-commit configuration in SGLang.

After this PR is merged, contributors can run pre-commit run --all-files locally to enforce code formatting with clang-format.

Modifications

Add clang-format 18 (v18.1.8) in .pre-commit-config.yaml, referenced the configuration in vllm.

Checklist

@Hongbosherlock

Copy link
Copy Markdown
Contributor Author

All tests have passed, cc @merrymercy
image

@zhyncs
zhyncs merged commit ba52fd1 into sgl-project:main Mar 19, 2025
@Hongbosherlock
Hongbosherlock deleted the clang-format branch March 21, 2025 06:46
0826joyce pushed a commit to 0826joyce/sglang-perf-opt that referenced this pull request May 19, 2026
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.

2 participants