From c0bbcca0cf0f4d8cf3a677b5cfbefd96f70d9827 Mon Sep 17 00:00:00 2001 From: serkixenos Date: Wed, 23 Mar 2022 13:32:03 -0400 Subject: [PATCH] Update clang format config to clang-format 10 --- .clang-format | 15 ++++++++++++--- README.md | 10 +++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.clang-format b/.clang-format index 2fffe7ba..b52934d0 100644 --- a/.clang-format +++ b/.clang-format @@ -1,6 +1,5 @@ --- Language: Cpp -# BasedOnStyle: LLVM AccessModifierOffset: -3 AlignAfterOpenBracket: Align AlignConsecutiveMacros: false @@ -12,7 +11,7 @@ AlignTrailingComments: true AllowAllArgumentsOnNextLine: true AllowAllConstructorInitializersOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false +AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: None AllowShortLambdasOnASingleLine: None @@ -57,6 +56,7 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 6 ContinuationIndentWidth: 6 Cpp11BracedListStyle: true +DeriveLineEnding: true DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false @@ -69,12 +69,17 @@ IncludeBlocks: Preserve IncludeCategories: - Regex: '^"(llvm|llvm-c|clang|clang-c)/' Priority: 2 + SortPriority: 0 - Regex: '^(<|"(gtest|gmock|isl|json)/)' Priority: 3 + SortPriority: 0 - Regex: '.*' Priority: 1 + SortPriority: 0 IncludeIsMainRegex: '(Test)?$' +IncludeIsMainSourceRegex: '' IndentCaseLabels: false +IndentGotoLabels: false IndentPPDirectives: None IndentWidth: 3 IndentWrappedFunctionNames: false @@ -110,18 +115,22 @@ SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyBlock: false SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 SpacesInAngles: false +SpacesInConditionalStatement: false SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false -Standard: Cpp11 +SpaceBeforeSquareBrackets: false +Standard: Latest StatementMacros: - Q_UNUSED - QT_REQUIRE_VERSION TabWidth: 3 +UseCRLF: false UseTab: Never ... diff --git a/README.md b/README.md index 7ee5aa8b..391218b7 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,11 @@ Officially supported OS is Ubuntu 20.04. Following dependencies are needed for a clean install of Ubuntu 20.04: ``` sudo apt-get install \ - apt-utils autoconf bash build-essential ca-certificates cmake dnsutils \ - doxygen expect git graphviz libboost-all-dev libbz2-dev libcurl4-openssl-dev \ - libncurses-dev libreadline-dev libsnappy-dev libssl-dev libtool libzip-dev \ - libzmq3-dev locales mc nano net-tools ntp openssh-server pkg-config perl \ - python3 python3-jinja2 sudo wget + apt-utils autoconf bash build-essential ca-certificates clang-format cmake + dnsutils doxygen expect git graphviz libboost-all-dev libbz2-dev \ + libcurl4-openssl-dev libncurses-dev libreadline-dev libsnappy-dev \ + libssl-dev libtool libzip-dev libzmq3-dev locales mc nano net-tools ntp \ + openssh-server pkg-config perl python3 python3-jinja2 sudo wget ```