From 8b7d72440e5d8a1acbe3f4692003d6c6eabd2205 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 8 Apr 2025 20:15:45 +1000 Subject: [PATCH] Specify both C and Cpp --- .clang-format | 21 +++++++++++++++++++++ .pre-commit-config.yaml | 1 + 2 files changed, 22 insertions(+) diff --git a/.clang-format b/.clang-format index f01a1151a..1871d1f7a 100644 --- a/.clang-format +++ b/.clang-format @@ -1,5 +1,26 @@ # A clang-format style that approximates Python's PEP 7 # Useful for IDE integration +Language: C +BasedOnStyle: Google +AlwaysBreakAfterReturnType: All +AllowShortIfStatementsOnASingleLine: false +AlignAfterOpenBracket: BlockIndent +BinPackArguments: false +BinPackParameters: false +BreakBeforeBraces: Attach +ColumnLimit: 88 +DerivePointerAlignment: false +IndentGotoLabels: false +IndentWidth: 4 +PointerAlignment: Right +ReflowComments: true +SortIncludes: false +SpaceBeforeParens: ControlStatements +SpacesInParentheses: false +TabWidth: 4 +UseTab: Never +--- +Language: Cpp BasedOnStyle: Google AlwaysBreakAfterReturnType: All AllowShortIfStatementsOnASingleLine: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 66cf6d118..140ce33be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,6 +44,7 @@ repos: - id: check-json - id: check-toml - id: check-yaml + args: [--allow-multiple-documents] - id: end-of-file-fixer exclude: ^Tests/images/ - id: trailing-whitespace