mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-09 14:08:08 -05:00
* Add initial clang tidy / clang format config files * Clang format the entire codebase ``` find ./src -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none find ./include -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none find ./Web -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none find ./dev -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none find ./wrappers -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none ``` * Add a .cmake-format file and reformat CmakeLists.txt with it https://github.com/cheshirekow/cmake_format * Add a clang-format workflow only runs on PRs, only on touched files
100 lines
3.1 KiB
YAML
100 lines
3.1 KiB
YAML
---
|
|
Language: Cpp
|
|
AccessModifierOffset: -1
|
|
AlignAfterOpenBracket: Align
|
|
AlignConsecutiveAssignments: false
|
|
AlignConsecutiveDeclarations: false
|
|
AlignEscapedNewlines: Left
|
|
AlignOperands: true
|
|
AlignTrailingComments: true
|
|
AllowAllParametersOfDeclarationOnNextLine: true
|
|
AllowShortBlocksOnASingleLine: false
|
|
AllowShortCaseLabelsOnASingleLine: false
|
|
AllowShortFunctionsOnASingleLine: Empty
|
|
AllowShortIfStatementsOnASingleLine: true
|
|
AllowShortLoopsOnASingleLine: false
|
|
AlwaysBreakAfterDefinitionReturnType: None
|
|
AlwaysBreakAfterReturnType: None
|
|
AlwaysBreakBeforeMultilineStrings: false
|
|
AlwaysBreakTemplateDeclarations: true
|
|
BinPackArguments: true
|
|
BinPackParameters: true
|
|
BraceWrapping:
|
|
AfterClass: true
|
|
AfterControlStatement: false
|
|
AfterEnum: true
|
|
AfterFunction: false
|
|
AfterNamespace: false
|
|
AfterObjCDeclaration: false
|
|
AfterStruct: true
|
|
AfterUnion: true
|
|
AfterExternBlock: true
|
|
BeforeCatch: false
|
|
BeforeElse: false
|
|
IndentBraces: false
|
|
SplitEmptyFunction: true
|
|
SplitEmptyRecord: true
|
|
SplitEmptyNamespace: true
|
|
BreakBeforeBinaryOperators: NonAssignment
|
|
BreakBeforeBraces: Custom
|
|
BreakBeforeInheritanceComma: true
|
|
BreakBeforeTernaryOperators: true
|
|
BreakConstructorInitializers: BeforeColon
|
|
BreakConstructorInitializersBeforeComma: false
|
|
BreakStringLiterals: true
|
|
ColumnLimit: 150
|
|
CommentPragmas: '^ IWYU pragma:'
|
|
CompactNamespaces: false
|
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
|
ConstructorInitializerIndentWidth: 2
|
|
ContinuationIndentWidth: 2
|
|
Cpp11BracedListStyle: true
|
|
DerivePointerAlignment: false
|
|
DisableFormat: false
|
|
ExperimentalAutoDetectBinPacking: false
|
|
FixNamespaceComments: true
|
|
IncludeBlocks: Preserve
|
|
IndentCaseLabels: true
|
|
IndentWidth: 4
|
|
IndentPPDirectives: AfterHash
|
|
IndentWrappedFunctionNames: true
|
|
NamespaceIndentation: None # Could consider Inner
|
|
PenaltyBreakAssignment: 2
|
|
PenaltyBreakBeforeFirstCallParameter: 19
|
|
PenaltyBreakComment: 300
|
|
PenaltyBreakFirstLessLess: 120
|
|
PenaltyBreakString: 1000
|
|
PenaltyExcessCharacter: 1000000
|
|
PenaltyReturnTypeOnItsOwnLine: 60
|
|
PointerAlignment: Left
|
|
ReflowComments: false
|
|
SpaceAfterCStyleCast: false
|
|
# SpaceAfterLogicalNot: false # No longer available in clang-format 6.0
|
|
SpaceAfterTemplateKeyword: true
|
|
SpaceBeforeAssignmentOperators: true
|
|
# SpaceBeforeCpp11BracedList: true # No longer available in clang-format 6.0
|
|
# SpaceBeforeCtorInitializerColon: true # No longer available in clang-format 6.0
|
|
# SpaceBeforeInheritanceColon: true # No longer available in clang-format 6.0
|
|
SpaceBeforeParens: ControlStatements
|
|
# SpaceBeforeRangeBasedForLoopColon: true # No longer available in clang-format 6.0
|
|
SpaceInEmptyParentheses: false
|
|
SpacesBeforeTrailingComments: 2
|
|
SpacesInAngles: false
|
|
SpacesInContainerLiterals: true
|
|
SpacesInCStyleCastParentheses: false
|
|
SpacesInParentheses: false
|
|
SpacesInSquareBrackets: false
|
|
SortIncludes: false
|
|
SortUsingDeclarations: true
|
|
Standard: c++17
|
|
TabWidth: 2
|
|
UseTab: Never
|
|
---
|
|
Language: JavaScript
|
|
BasedOnStyle: Mozilla
|
|
# Use 100 columns for JS.
|
|
ColumnLimit: 180
|
|
JavaScriptQuotes: Single
|
|
SpacesInContainerLiterals: false
|
|
...
|