Open nordic-krch opened 2 months ago
FYI clang-format
reports checkpatch issues on the "notice" level, these aren't blocking PRs.
yes, but if i run clang-format
on a file and commit that I will get red CI because checkpatch reports those as errors. https://docs.zephyrproject.org/latest/contribute/guidelines.html#clang-format suggests to use it. On the other hand it states that
When there are differences between the Coding Style guidelines and the formatting generated by code formatting tools, the Coding Style guidelines take precedence.
but it would be best to configure it in a way so that there are as few differences as possible.
If it's not recommended to run clang-format on entire existing file (https://github.com/zephyrproject-rtos/zephyr/pull/78179#issuecomment-2340255925) then maybe it's worth adding it to the guidelines section about clang-format
. It's not clear how to treat those notices left by clang-format in the PR? Is it obligatory to fix them?
Describe the bug
After running
clang-format
ondrivers/serial/uart_nrfx_uarte.c
(#78179) I'm getting checkpatch errors.There are 2 types of errors:
SPACING: space prohibited before that close parenthesis ')'
clang-format added space afterVAL,
in a statement like belowTABSTOP: Statements should start on a tabstop
clang-format reformatted macro with code generation in a way that is not accepted by checkpath.To Reproduce
drivers/serial/uart_nrfx_uarte.c
and then run checkpatchExpected behavior
Running clang-format shall not violate checkpatch rules.
Impact
Red CI after running clang-format. Manual code adjustment must be used which discourage user from using clang-format.
Environment (please complete the following information):