My company, always on the bleeding edge, decided to merge this into our repo’s clang format file:
BraceWrapping: - AfterCaseLabel: true
As I understand it, this option is new to Clang10. VisualGDB seems to choke on it, and formats my file using some other, unknown format where everything is wrapped at 80 columns, braces are always on the same line, etc. Is there any way that unknown options can just be ignored?
Our clang-format-based formatter is indeed based on an older version of Clang (6.0). All options supported by this version should work out-of-the-box. We will update it to use a newer Clang version in the next major VisualGDB release, so the newly added options will work as well.
The loading and applying of formatting styles is done by the clang-format directly and is outside of VisualGDB control. The best thing we can offer is to add a setting to filter out lines containing specific substrings in the clang-format file (e.g. you can blacklist AfterCaseLabel) and VisualGDB will automatically remove that entire line from the .clang-format file before passing it to the clang engine.
You can set the newTools->Options->Text Editor->C/C++(VisualGDB)->Formatting Engine->Ignored clang-format statementsoption to AfterCaseLabel and VisualGDB will automatically filter out any lines containing AfterCaseLabel (the check is case-sensitive) when loading clang-format files. You can separate multiple values via semicolons.