Topic: Struggling with fix_formatting
tothxa Topic Opener |
Posted at: 2021-09-10, 09:49
Latest chapter: How can I get it to accept a commit that includes formatting fixes? This one was right next to the part I was modifying. Running
Previous one: I think this is a bug in
I tried several ways to work it around, but I couldn't. It insists on treating the comment as if it belonged to the undef.
I guess a Is there a way to tell Top Quote |
Nordfriese |
Posted at: 2021-09-10, 10:18
Regarding the first one issue: The formatting results are highly specific to the clang-format version you use. An up-/downgrade to a different clang-format version reformats close to 100 files in the repo. That's why it's run only as an action, not locally on the developer's machine (we used to do that – it was horrible…). The action only actually commits any changes if the branch has an open pull request to master. Otherwise no commit is triggered to avoid annoying the developer. You can work around this by temporarily editing Re the second issue: clang-format is prone to this sort of errors. When it's really wrong (like here) you can surround the lines with
to disable all formatting. Top Quote |
tothxa Topic Opener |
Posted at: 2021-09-10, 16:06
Thank you for the explanation. Top Quote |