gitlab clang format issues

(Andy Bauer) #1

For MR 2881 I have a multiline string of Python code in my C++ code that doesn’t pass the clang format check and thus is listed as an error which then won’t allow me to merge my commit. How can I get around that?

Note that when I used Do: reformat it munged up the code so that it didn’t compile.


(Kenneth Moreland) #2

You can turn off clang formatting for a block of code by adding the comment // clang-format off and turn it on again with a // clang-format on.

(Andy Bauer) #3

That fixed it – thanks!