From 9c8e58bc7c14938e76483a914a831fea0c2ca0fb Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Thu, 26 Feb 2026 02:22:30 +0100 Subject: [PATCH] feat: add cpp language settings --- cpp/.clang-format | 20 ++++++++++++++++++++ cpp/.clang-tidy | 20 ++++++++++++++++++++ cpp/.clangd | 15 +++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 cpp/.clang-format create mode 100644 cpp/.clang-tidy create mode 100644 cpp/.clangd diff --git a/cpp/.clang-format b/cpp/.clang-format new file mode 100644 index 0000000..501b1ed --- /dev/null +++ b/cpp/.clang-format @@ -0,0 +1,20 @@ +--- +Language: Cpp +BasedOnStyle: LLVM +AlignAfterOpenBracket: BlockIndent +AlignArrayOfStructures: Left +AllowShortFunctionsOnASingleLine: None +BinPackArguments: false +BinPackParameters: false +BreakBeforeBraces: WebKit +BreakConstructorInitializers: AfterColon +BreakInheritanceList: AfterColon +IncludeIsMainRegex: '(_test)?$' +LineEnding: LF +PackConstructorInitializers: Never +PenaltyBreakAssignment: 100 +PointerAlignment: Left +QualifierAlignment: Left +SeparateDefinitionBlocks: Always +Standard: Latest +... diff --git a/cpp/.clang-tidy b/cpp/.clang-tidy new file mode 100644 index 0000000..71e4553 --- /dev/null +++ b/cpp/.clang-tidy @@ -0,0 +1,20 @@ +--- +Checks: > + bugprone-*, + cert-*, + clang-analyzer-*, + clang-diagnostic-*, + concurrency-*, + cppcoreguidelines-*, + hicpp-*, + misc-*, + modernize-*, + performance-*, + portability-*, + readability-*, + -bugprone-easily-swappable-parameters, + -cppcoreguidelines-pro-type-reinterpret-cast, + -cppcoreguidelines-pro-bounds-pointer-arithmetic, + -cppcoreguidelines-pro-bounds-constant-array-index + +FormatStyle: file diff --git a/cpp/.clangd b/cpp/.clangd new file mode 100644 index 0000000..3ed369c --- /dev/null +++ b/cpp/.clangd @@ -0,0 +1,15 @@ +--- +Diagnostics: + UnusedIncludes: Strict + MissingIncludes: Strict + +Completion: + AllScopes: true + +InlayHints: + Enabled: No + +# Will possibly be supported in clangd 22 +Documentation: + CommentFormat: Doxygen +...