From bfa78c6d575517b22abb1eb9b090e924e15277b4 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Fri, 16 Feb 2024 04:55:45 -0800 Subject: [PATCH] satisfy nRF24/.github#9 --- .clang-format | 31 +++++++++++-------------------- .github/workflows/build_linux.yml | 2 ++ 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/.clang-format b/.clang-format index 5b8681e..c02cf2f 100644 --- a/.clang-format +++ b/.clang-format @@ -14,13 +14,13 @@ AlignTrailingComments: true AllowAllArgumentsOnNextLine: true AllowAllConstructorInitializersOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true -AllowShortEnumsOnASingleLine: true -AllowShortBlocksOnASingleLine: Always +AllowShortEnumsOnASingleLine: false +AllowShortBlocksOnASingleLine: Empty AllowShortCaseLabelsOnASingleLine: true AllowShortFunctionsOnASingleLine: All AllowShortLambdasOnASingleLine: All -AllowShortIfStatementsOnASingleLine: WithoutElse -AllowShortLoopsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: Yes @@ -67,10 +67,7 @@ DeriveLineEnding: false DerivePointerAlignment: false DisableFormat: false EmptyLineBeforeAccessModifier: Always -# --- -# only in v13+ -# EmptyLineAfterAccessModifier: Leave -# --- +EmptyLineAfterAccessModifier: Leave ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true IncludeBlocks: Preserve @@ -89,10 +86,7 @@ IncludeCategories: CaseSensitive: false IncludeIsMainRegex: "(Test)?$" IncludeIsMainSourceRegex: "" -# --- -# only in v13+ -# IndentAccessModifiers: false -# --- +IndentAccessModifiers: false IndentCaseLabels: true IndentCaseBlocks: false IndentGotoLabels: false @@ -117,15 +111,12 @@ PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 60 PenaltyIndentedWhitespace: 0 PointerAlignment: Left -# --- -# only in v13+ -# ReferenceAlignment: Right -# --- +ReferenceAlignment: Pointer ReflowComments: true -# --- -# only in v13+ -# ShortNamespaceLines: 0 -# --- +SpacesInLineCommentPrefix: + Maximum: -1 + Minimum: 0 +ShortNamespaceLines: 0 # Sort**** is about sorting include/using statements alphabetically SortIncludes: false SortUsingDeclarations: false diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index b229419..759497e 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -2,6 +2,7 @@ name: Linux build on: pull_request: + branches: [master] types: [opened, reopened] paths: - "*.h" @@ -12,6 +13,7 @@ on: - "!**Makefile" # old build system is not tested in this workflow - ".github/workflows/build_linux.yml" push: + branches: [master] paths: - "*.h" - "*.cpp"