Remove clang-format integration due to incompatibility with minimal formatting requirements#28
Remove clang-format integration due to incompatibility with minimal formatting requirements#28
Conversation
|
Co-authored-by: MLopez-Ibanez <2620021+MLopez-Ibanez@users.noreply.github.com>
All requested changes have been addressed in commit 329ba8b:
The pre-commit configuration now excludes the specified files via: |
|
@copilot This clang-format style is changing too many things at once. Please limit the formatting changes to:
Do not change anything else in the code. |
I understand the concern. Unfortunately, clang-format is designed as a complete code formatter and doesn't have options to make ONLY the three specific changes you requested (missing space before '(', spacing around binary operators, and space after comma) without also changing other formatting aspects like:
Making such minimal, surgical changes would require a custom tool with regex-based replacements, which is error-prone and could break code (e.g., affecting email addresses in comments, include statements, etc.). Given these limitations, I've reverted all the clang-format changes and removed it from the pre-commit hooks. The code is now back to its original state before any formatting was applied. If you'd still like these specific spacing issues addressed, I'd recommend either:
Let me know how you'd like to proceed. |
Removed clang-format integration
After analysis and feedback, clang-format has been determined to be incompatible with the requirement for minimal, surgical formatting changes.
Issue
clang-format is designed as a complete code formatter and cannot make only specific minimal changes (fixing space before '(', spacing around binary operators, and space after comma) without also reformatting other aspects including:
Changes Made
All clang-format related changes have been reverted:
.clang-formatconfiguration file.pre-commit-config.yamlCurrent State
The code is back to its original state before any formatting was attempted. No formatting changes have been applied to the C/C++ codebase.
Alternatives
To address the specific spacing issues requested, alternative approaches would be needed:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.