From ce6da002aacba54008b6d80074c9bf6a699c2f35 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Fri, 6 Aug 2021 20:48:06 -0500 Subject: [PATCH] Add protobuf support to clang-format --- .clang-format | 7 ++++--- .pre-commit-config.yaml | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.clang-format b/.clang-format index 6d5f176be..27d9025cd 100644 --- a/.clang-format +++ b/.clang-format @@ -21,7 +21,6 @@ IndentCaseLabels: 'false' IndentWidth: '8' IncludeBlocks: 'Regroup' KeepEmptyLinesAtTheStartOfBlocks: 'false' -Language: 'Cpp' MaxEmptyLinesToKeep: '1' PointerAlignment: 'Right' SortIncludes: 'true' @@ -32,10 +31,12 @@ SpaceInEmptyParentheses: 'false' SpacesInSquareBrackets: 'false' TabWidth: '8' UseTab: 'Always' - PenaltyBreakAssignment: '3' PenaltyBreakBeforeFirstCallParameter: '15' - +--- +Language: 'Proto' +--- +Language: 'Cpp' IncludeCategories: - Regex: '^"config.h"$' Priority: '0' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 04458d091..0c574614b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,11 +9,12 @@ repos: - id: check-executables-have-shebangs - id: forbid-new-submodules - id: check-yaml + exclude: '.clang-format' - id: check-json - id: check-symlinks - id: check-xml - id: end-of-file-fixer - types_or: [c, shell, python] + types_or: [c, shell, python, proto] - id: trailing-whitespace types_or: [c, shell, python, xml] - id: check-docstring-first