-
Notifications
You must be signed in to change notification settings - Fork 12
Include clang-format document #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,203 @@ | ||||||
| TabWidth: 4 | ||||||
| IndentWidth: 4 | ||||||
| ColumnLimit: 150 | ||||||
|
|
||||||
| UseTab: AlignWithSpaces | ||||||
|
|
||||||
| # Pointer and reference alignment style. Possible values: Left, Right, Middle. | ||||||
| PointerAlignment: Right | ||||||
|
|
||||||
| # AccessModifierOffset (int) | ||||||
| # The extra indent or outdent of access modifiers, e.g. public:. | ||||||
| AccessModifierOffset: 0 | ||||||
|
|
||||||
| AlignArrayOfStructures: Right | ||||||
| AlignAfterOpenBracket: true | ||||||
| AlignConsecutiveAssignments: Consecutive | ||||||
| AlignConsecutiveBitFields: Consecutive | ||||||
| AlignConsecutiveDeclarations: None | ||||||
| AlignConsecutiveMacros: Consecutive | ||||||
| AlignConsecutiveShortCaseStatements: | ||||||
| Enabled: true | ||||||
| AcrossEmptyLines: true | ||||||
| AcrossComments: true | ||||||
| AlignCaseColons: false | ||||||
|
|
||||||
|
|
||||||
| AlignEscapedNewlines: LeftWithLastLine | ||||||
|
|
||||||
| AlignOperands: Align | ||||||
|
|
||||||
| AlignTrailingComments: | ||||||
| Kind: Always | ||||||
| AlignPPAndNotPP: true | ||||||
|
|
||||||
| AllowAllArgumentsOnNextLine: true | ||||||
| AllowAllParametersOfDeclarationOnNextLine: true | ||||||
| AllowBreakBeforeNoexceptSpecifier: Always | ||||||
|
|
||||||
| AllowShortBlocksOnASingleLine: Always | ||||||
| AllowShortCaseExpressionOnASingleLine: true | ||||||
| AllowShortCaseLabelsOnASingleLine: true | ||||||
| AllowShortCompoundRequirementOnASingleLine: true | ||||||
| AllowShortEnumsOnASingleLine: false | ||||||
|
|
||||||
| AllowShortFunctionsOnASingleLine: Empty | ||||||
| AllowShortIfStatementsOnASingleLine: WithoutElse | ||||||
| AllowShortLambdasOnASingleLine: Inline | ||||||
| AllowShortLoopsOnASingleLine: true | ||||||
| AllowShortNamespacesOnASingleLine: false | ||||||
|
|
||||||
| AlwaysBreakBeforeMultilineStrings: false | ||||||
|
|
||||||
| BitFieldColonSpacing: Both | ||||||
|
|
||||||
| # TODO Highly Opinionated will need to deliberate on this. I prefer K&R Style but some prefer Allman | ||||||
| BreakBeforeBraces: Custom | ||||||
| BraceWrapping: | ||||||
| AfterCaseLabel: false | ||||||
| AfterClass: false | ||||||
| AfterControlStatement: Never | ||||||
| AfterEnum: false | ||||||
| AfterFunction: false | ||||||
| AfterNamespace: false | ||||||
| AfterStruct: false | ||||||
| AfterExternBlock: false | ||||||
| BeforeCatch: true # catch on separate line, not like we'll use catch | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just for consistency. I'd also rather have K&R |
||||||
| BeforeElse: true | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not having a break for if but having for else will look strange for me.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like if you set In my opinion that does make it a little harder to read especially if the last line before the else has a lot of values. |
||||||
| BeforeLambdaBody: false | ||||||
| BeforeWhile: true | ||||||
| IndentBraces: false | ||||||
|
|
||||||
| BreakAdjacentStringLiterals: false | ||||||
| BreakAfterAttributes: Leave | ||||||
|
|
||||||
| BreakAfterOpenBracketBracedList: false | ||||||
| BreakAfterOpenBracketFunction: false | ||||||
| BreakAfterOpenBracketIf: false | ||||||
| BreakAfterOpenBracketLoop: false | ||||||
| BreakAfterOpenBracketSwitch: false | ||||||
| BreakAfterReturnType: Automatic | ||||||
|
|
||||||
| BreakBeforeBinaryOperators: None | ||||||
| BreakBeforeCloseBracketBracedList: true | ||||||
| BreakBeforeCloseBracketFunction: true | ||||||
| BreakBeforeCloseBracketIf: true | ||||||
| BreakBeforeCloseBracketSwitch: true | ||||||
|
|
||||||
| BreakBeforeConceptDeclarations: Allowed | ||||||
| BreakBeforeInlineASMColon: OnlyMultiline | ||||||
| BreakBeforeTemplateCloser: true | ||||||
| BreakBeforeTernaryOperators: true | ||||||
|
|
||||||
| BreakConstructorInitializers: AfterColon | ||||||
| BreakFunctionDefinitionParameters: false | ||||||
|
|
||||||
| BreakInheritanceList: AfterColon | ||||||
|
|
||||||
| BreakStringLiterals: false | ||||||
|
|
||||||
| BreakTemplateDeclarations: Leave | ||||||
|
|
||||||
| CompactNamespaces: false | ||||||
|
|
||||||
| Cpp11BracedListStyle: FunctionCall | ||||||
|
|
||||||
| EmptyLineAfterAccessModifier: Leave | ||||||
| EmptyLineBeforeAccessModifier: LogicalBlock | ||||||
|
|
||||||
| EnumTrailingComma: Leave | ||||||
|
|
||||||
| FixNamespaceComments: true | ||||||
|
|
||||||
| IndentAccessModifiers: false | ||||||
|
|
||||||
| IndentCaseBlocks: false | ||||||
|
|
||||||
| IndentExportBlock: false | ||||||
| IndentExternBlock: false | ||||||
| IndentGotoLabels: true | ||||||
|
|
||||||
| IndentPPDirectives: BeforeHash | ||||||
| IndentRequiresClause: false | ||||||
| IndentWrappedFunctionNames: false | ||||||
|
|
||||||
| # I personally don't like unbraced things but this should be heavily discussed | ||||||
| # For example it's a Pain in the ass to go back and add braces when someone | ||||||
| # didn't include them after you need to extend it | ||||||
| InsertBraces: true | ||||||
|
|
||||||
| InsertNewlineAtEOF: true | ||||||
|
|
||||||
| # This one will be controversial... | ||||||
| IntegerLiteralSeparator: | ||||||
| Binary: 4 | ||||||
| Decimal: 3 | ||||||
| Hex: 4 | ||||||
|
JoltedJon marked this conversation as resolved.
|
||||||
| BinaryMinDigitsInsert: 8 | ||||||
| DecimalMinDigitsInsert: 6 | ||||||
| HexMinDigitsInsert: 8 | ||||||
|
|
||||||
| KeepEmptyLines: | ||||||
| AtEndOfFile: false | ||||||
| AtStartOfBlock: false | ||||||
| AtStartOfFile: false | ||||||
|
|
||||||
| KeepFormFeed: false | ||||||
|
|
||||||
| # No Microslop BS \r\n | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win Revise unprofessional comment. The comment contains informal language and a derogatory reference that is inappropriate for a project configuration file. Consider rewording to maintain professionalism. 📝 Suggested revision-# No Microslop BS \r\n
+# Use Unix-style line endings (LF) instead of Windows-style (CRLF)
LineEnding: LF📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| LineEnding: LF | ||||||
|
|
||||||
| NamespaceIndentation: None | ||||||
|
|
||||||
| NumericLiteralCase: | ||||||
| ExponentLetter: Leave | ||||||
| HexDigit: Lower | ||||||
| Prefix: Lower | ||||||
| Suffix: Upper | ||||||
|
|
||||||
| QualifierAlignment: Right | ||||||
|
|
||||||
| ReflowComments: Never | ||||||
|
|
||||||
| RemoveBracesLLVM: false | ||||||
| RemoveEmptyLinesInUnwrappedLines: false | ||||||
| RemoveParentheses: Leave | ||||||
|
|
||||||
| RemoveSemicolon: false | ||||||
|
|
||||||
| RequiresExpressionIndentation: OuterScope | ||||||
|
|
||||||
| SeparateDefinitionBlocks: Leave | ||||||
|
|
||||||
| SkipMacroDefinitionBody: true | ||||||
|
|
||||||
| SortIncludes: | ||||||
| Enabled: false | ||||||
|
|
||||||
| SortUsingDeclarations: Never | ||||||
|
|
||||||
| SpaceAfterCStyleCast: false | ||||||
| SpaceAfterLogicalNot: false | ||||||
| SpaceAfterOperatorKeyword: false | ||||||
| SpaceAfterTemplateKeyword: false | ||||||
| SpaceAroundPointerQualifiers: Default | ||||||
|
|
||||||
| SpaceBeforeAssignmentOperators: true | ||||||
| SpaceBeforeCaseColon: false | ||||||
| SpaceBeforeCpp11BracedList: false | ||||||
| SpaceBeforeCtorInitializerColon: true | ||||||
| SpaceBeforeInheritanceColon: true | ||||||
| SpaceBeforeParens: ControlStatements | ||||||
|
|
||||||
| SpaceBeforeRangeBasedForLoopColon: true | ||||||
| SpaceBeforeSquareBrackets: false | ||||||
| SpaceInEmptyBraces: Always | ||||||
|
|
||||||
| SpacesInAngles: Leave | ||||||
|
|
||||||
| SpacesInContainerLiterals: false | ||||||
| SpacesInParens: Never | ||||||
| SpacesInSquareBrackets: false | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| build/* | ||
| engine/native/thirdparty/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vote for pointer to the left (on the side of the type)