diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..a4d795e --- /dev/null +++ b/.clang-format @@ -0,0 +1,37 @@ +--- +BasedOnStyle: "Chromium" +Standard: Cpp20 + +# I like K&R, fight me +IndentWidth: 4 +TabWidth: 4 +UseTab: Never +AllowShortIfStatementsOnASingleLine: false +BreakBeforeBraces: Attach + +BraceWrapping: + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: false + AfterNamespace: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false + +AllowShortEnumsOnASingleLine: false +AlignConsecutiveAssignments: false +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: false +AlignAfterOpenBracket: false +AllowShortFunctionsOnASingleLine: None +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakBeforeMultilineStrings: false +BreakBeforeBinaryOperators: None +BreakBeforeTernaryOperators: true +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakString: 1000 +PointerAlignment: Left +ConstructorInitializerAllOnOneLineOrOnePerLine: false +ConstructorInitializerIndentWidth: 4 diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..f1bc861 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,32 @@ +--- +Checks: > + -*, + readability-*, + modernize-*, + cppcoreguidelines-*, + performance-*, + bugprone-*, + clang-analyzer-*, + misc-*, + google-*, + cert-*, + portability-*, + cppcoreguidelines-pro-bounds-array-to-pointer-decay + +WarningsAsErrors: '' +HeaderFilterRegex: '.*' +FormatStyle: none +User: '' +CheckOptions: + - key: readability-identifier-naming.VariableCase + value: lower_case + - key: readability-identifier-naming.FunctionCase + value: CamelCase + - key: modernize-use-auto + value: 0 + - key: modernize-use-nullptr + value: 1 + - key: cppcoreguidelines-non-private-member-variables-in-classes + value: 1 + - key: modernize-use-override + value: 1