Skip to content
Snippets Groups Projects
Commit 5fa0d696 authored by Daniel Vonk's avatar Daniel Vonk
Browse files

Add linting + formatting

parent 0616fe56
No related branches found
No related tags found
2 merge requests!19Merge develop into main,!11Add linting + formatting
---
Language: Json
DisableFormat: false
IndentWidth: 4
---
BasedOnStyle: WebKit
Language: Cpp
Standard: Cpp11
IndentWidth: 4
SpacesBeforeTrailingComments: 1
TabWidth: 8
UseTab: Never
ContinuationIndentWidth: 4
MaxEmptyLinesToKeep: 3
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakConstructorInitializersBeforeComma: true
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
ForEachMacros:
- forever # avoids { wrapped to next line
- foreach
- Q_FOREACH
AccessModifierOffset: -4
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortEnumsOnASingleLine: false # requires clang-format 11
AlignAfterOpenBracket: true
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackParameters: true
ColumnLimit: 100
Cpp11BracedListStyle: true
DerivePointerBinding: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: false
NamespaceIndentation: None
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerBindsToType: false
SpaceAfterTemplateKeyword: false
IndentFunctionDeclarationAfterType: false
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: true
SpacesInParentheses: false
...
Checks: '
-*,
bugprone-*,
-bugprone-narrowing-conversions,
-bugprone-integer-division,
-bugprone-parent-virtual-call,
-bugprone-macro-parentheses,
performance-*,
-performance-no-automatic-move,
readability-avoid-const-params-in-decls,
readability-const-return-type,
readability-container-size-empty,
readability-inconsistent-declaration-parameter-name,
readability-isolate-declaration,
readability-redundant-member-init,
readability-redundant-smartptr-get,
readability-simplify-boolean-expr,
readability-use-anyofallof,
-readability-make-member-function-const,
-readability-qualified-auto,
cppcoreguidelines-init-variables,
cppcoreguidelines-interfaces-global-init,
cppcoreguidelines-prefer-member-initializer,
cppcoreguidelines-pro-type-cstyle-cast,
cppcoreguidelines-pro-type-member-init,
cppcoreguidelines-pro-type-reinterpret-cast,
cppcoreguidelines-slicing,
cppcoreguidelines-special-member-functions,
google-build-explicit-make-pair,
google-explicit-constructor,
misc-misplaced-const,
misc-redundant-expression,
misc-throw-by-value-catch-by-reference,
modernize-concat-nested-namespaces,
modernize-loop-convert,
-modernize-make-shared,
modernize-make-unique,
modernize-redundant-void-arg,
modernize-replace-random-shuffle,
modernize-use-auto,
modernize-use-emplace,
modernize-use-equals-default,
modernize-use-nullptr,
modernize-use-override,
modernize-use-using,
'
CheckOptions:
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: True
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctionsWhenCopyIsDeleted
value: True
[codespell]
skip = ./build-*,.git
interactive = 3
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment