I got this doxygen comments in my legacy codebase and I like to keep them for consistency.
/***************//****************************************************************
*
* @file
*
* Serial inteface to Novatel OEM4 GPS API.
*
*******************************************************************************/
Unfortunately clang-format-7 is formatting the comments unusual and makes the doxygen comments useless.
/*****************************************************************************/ /**
*
* @file
*
* Serial inteface to Novatel OEM4 GPS API.
*
*******************************************************************************/
I tried CommentPragmas : '^\.+' or '//**' in my .clang-format with no success.
My .clang-format is the following
---
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: 'true'
AlignConsecutiveDeclarations: 'true'
AlignEscapedNewlines: Right
AlignOperands: 'true'
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AllowShortBlocksOnASingleLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: 'false'
AlwaysBreakAfterDefinitionReturnType: None
BinPackArguments: 'false'
BinPackParameters: 'false'
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Stroustrup
BreakBeforeTernaryOperators: 'true'
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: 'true'
ColumnLimit: '132'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
Cpp11BracedListStyle: 'true'
DerivePointerAlignment: 'false'
IndentCaseLabels: 'false'
IndentPPDirectives: AfterHash
IndentWidth: '4'
IndentWrappedFunctionNames: 'false'
KeepEmptyLinesAtTheStartOfBlocks: 'false'
Language: Cpp
MaxEmptyLinesToKeep: '1'
PointerAlignment: Right
ReflowComments: 'true'
SortIncludes: 'false'
SortUsingDeclarations: 'false'
SpaceAfterCStyleCast: 'true'
SpacesBeforeTrailingComments: '2'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeCpp11BracedList: 'false'
SpaceBeforeParens: ControlStatements
Standard: Cpp11
TabWidth: '4'
UseTab: Never
CommentPragmas: '^\\.+'
...
I expect the doxygen comment to be untouched with my CommentPragmas, but it is not working for me.
Any help is appreciated.