-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
Is your enhancement proposal related to a problem? Please describe.
Running clang-format on a file with old code that doesn't follow the current coding style makes a substantial code change unreviewable, unless clang-format is performed beforehand and put in a separate commit that can be skipped faster by
the reviewers. The change (new code) can now easily be reformatted by clang-format too before committing.
With #73360 I experienced this is actually not desired.
Describe the solution you'd like
Update https://docs.zephyrproject.org/latest/contribute/guidelines.html#clang-format to explain why reformatting old code before adding the changes is not desired and add what to do in this situation. The new code should adhere to the current coding style, even if it deviates from the style used in the c file?
Perhaps some small examples can be added.