From 27eabf81cfe9e14f63284be4ff35c2f56afc4031 Mon Sep 17 00:00:00 2001 From: Ethan Havemann Date: Fri, 14 Feb 2025 08:09:56 -0600 Subject: [PATCH 1/3] > --- .clang-format | 21 +++++++++++++++++++++ .clang-tidy | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .clang-format create mode 100644 .clang-tidy diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..4baae8b --- /dev/null +++ b/.clang-format @@ -0,0 +1,21 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +UseTab: Never +ColumnLimit: 160 +BreakBeforeBraces: Allman +SeparateDefinitionBlocks: Always +BreakTemplateDeclarations: Yes +BraceWrapping: + AfterClass: true + AfterControlStatement: true + AfterEnum: true + AfterFunction: true + AfterNamespace: true + AfterStruct: true + AfterUnion: true + BeforeCatch: true + BeforeElse: true + IndentBraces: false + +IndentRequiresClause: false + diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..825dcb5 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,36 @@ +--- +Checks: 'clang-diagnostic-*,clang-analyzer-*,-modernize-use-trailing-return-type,clang-diagnostic-narrowing-conversion,misc-include-cleaner' +WarningsAsErrors: '*' +HeaderFilterRegex: '' +FormatStyle: google +CheckOptions: + - key: cert-dcl16-c.NewSuffixes + value: 'L;LL;LU;LLU' + - key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField + value: '0' + - key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors + value: '1' + - key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic + value: '1' + - key: google-readability-braces-around-statements.ShortStatementLines + value: '1' + - key: google-readability-function-size.StatementThreshold + value: '800' + - key: google-readability-namespace-comments.ShortNamespaceLines + value: '10' + - key: google-readability-namespace-comments.SpacesBeforeComments + value: '2' + - key: modernize-loop-convert.MaxCopySize + value: '16' + - key: modernize-loop-convert.MinConfidence + value: reasonable + - key: modernize-loop-convert.NamingStyle + value: CamelCase + - key: modernize-pass-by-value.IncludeStyle + value: llvm + - key: modernize-replace-auto-ptr.IncludeStyle + value: llvm + - key: modernize-use-nullptr.NullMacros + value: 'NULL' +... + From f3bf198ba61ae9a348085a0a4eba8d67552a5e5a Mon Sep 17 00:00:00 2001 From: Ethan Havemann Date: Fri, 14 Feb 2025 08:26:35 -0600 Subject: [PATCH 2/3] actions old --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 4baae8b..674ee46 100644 --- a/.clang-format +++ b/.clang-format @@ -4,7 +4,7 @@ UseTab: Never ColumnLimit: 160 BreakBeforeBraces: Allman SeparateDefinitionBlocks: Always -BreakTemplateDeclarations: Yes +# BreakTemplateDeclarations: Yes BraceWrapping: AfterClass: true AfterControlStatement: true From 3d753b6332080b701d3e601bed012b00ef28d9c0 Mon Sep 17 00:00:00 2001 From: Ethan Havemann Date: Fri, 14 Feb 2025 08:28:39 -0600 Subject: [PATCH 3/3] fmt --- src/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1f0308c..a231605 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,7 @@ #include -int main() { - std::cout << "Hello World" << std::endl; - return 0; + +int main() +{ + std::cout << "Hello World" << std::endl; + return 0; }