[edk2-devel] Anyone successfully enabled clangd in edk2 code?

Tomas Pilar (tpilar) tpilar at solarflare.com
Tue Jan 7 10:34:56 UTC 2020


​Sorry Guys, I did not see the previous email. I don't claim my clang-format is perfect, you might need to tweak it a little.

-----------------------------------------------
BasedOnStyle: LLVM
AlignAfterOpenBracket: Align
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: All
AlwaysBreakAfterReturnType: All
AlwaysBreakBeforeMultilineStrings: false
BinPackArguments: true
BinPackParameters: false
ExperimentalAutoDetectBinPacking: false
BreakBeforeBraces: Linux
BreakBeforeTernaryOperators: true
BreakStringLiterals: true
ColumnLimit: 0
CompactNamespaces: false
ContinuationIndentWidth: 2
Cpp11BracedListStyle: false
DerivePointerAlignment: true
FixNamespaceComments: true
IncludeBlocks: Regroup
IndentCaseLabels: true
IndentWidth: 2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 3
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 2
​

Cheers,
Tom




From: devel at edk2.groups.io <devel at edk2.groups.io> on behalf of Sean via Groups.Io <sean.brogan=microsoft.com at groups.io>
Sent: 07 January 2020 04:54
To: Ni; Ray; Devel EDK2
Subject: Re: [edk2-devel] Anyone successfully enabled clangd in edk2 code?
  
Thomas,

Are you able to share the Clang-format file?  I would like to get a format file as close to edk2 style as possible and then see if we can move the community to auto formatted code.  This could then be easily enforced by a PR gate that requires all modified/new  files to conform to auto formatted code.  This would reduce the noise on the mailing list and make it easier to contribute to the project all while making edk2 more consistent.  

Thanks
Sean
    
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#52978): https://edk2.groups.io/g/devel/message/52978
Mute This Topic: https://groups.io/mt/69246459/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list