Open luishfonseca opened 12 months ago
Sadly this didn't work
This is still a problem, no use closing it @luishfonseca. You should explain why we can't fix it easily right now, maybe someone in the future can do it. We can also redirect people here later. After that just unassign yourself from the issue.
Sure, here's the explanation of why it's not fixed and how to cope with it:
clang-tidy
has 3 ways to operate: just warn, try to fix, write fixes to a file.
When it attempts to fix, it can then format the code afterwards. However, in our action, the fixes are stored in a file and the suggested, so the format step can't be used.
Occasionally, clang-tidy
will suggest unformatted code, just accepting leads to CI failure. This same problem applies to any code suggested through the GitHub interface.
The solution is to locally amend the erroneous commit without any extra changes, that alone will trigger the pre-commit and format the suggested changes.
Problem
Clang-tidy gives suggestions that then fail formatting
Solution
It should respect .clang-format