diff --git a/.clang-format b/.clang-format index d6b6f78..a57ae2a 100644 --- a/.clang-format +++ b/.clang-format @@ -9,7 +9,7 @@ AlignEscapedNewlines: Left AlignOperands: true AlignTrailingComments: true AllowAllParametersOfDeclarationOnNextLine: false -AllowShortBlocksOnASingleLine: false +AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: Never @@ -73,7 +73,7 @@ PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 10000 # Raised intentionally because it hurts readability PointerAlignment: Left ReflowComments: true -SortIncludes: false +SortIncludes: Never SortUsingDeclarations: false SpaceAfterCStyleCast: true SpaceAfterTemplateKeyword: true @@ -90,7 +90,7 @@ SpacesInCStyleCastParentheses: false SpacesInContainerLiterals: false SpacesInParentheses: false SpacesInSquareBrackets: false -Standard: Cpp11 +Standard: c++14 TabWidth: 8 UseTab: Never ... diff --git a/c++/cavl.hpp b/c++/cavl.hpp index ac42c66..f64132b 100644 --- a/c++/cavl.hpp +++ b/c++/cavl.hpp @@ -58,10 +58,9 @@ class Tree; /// The size of this type is 4x pointer size (16 bytes on a 32-bit platform). /// /// No Sonar cpp:S1448 b/c this is the main node entity without public members - maintainability is not a concern here. -/// No Sonar cpp:S4963 b/c `Node` supports move operation. /// template -class Node // NOSONAR cpp:S1448 cpp:S4963 +class Node // NOSONAR cpp:S1448 { // Polyfill for C++17's std::invoke_result_t. template @@ -747,7 +746,7 @@ class Tree final // NOSONAR cpp:S3624 { public: /// Helper alias of the compatible node type. - using NodeType = ::cavl::Node; + using NodeType = Node; using DerivedType = Derived; Tree() = default; @@ -896,8 +895,7 @@ class Tree final // NOSONAR cpp:S3624 /// the same call stack) we may occasionally fail to detect a bona fide case of a race condition, but this is /// acceptable because the purpose of this feature is to provide a mere best-effort data race detection. /// - /// No Sonar cpp:S4963 b/c of the RAII pattern. - class TraversalIndicatorUpdater final // NOSONAR cpp:S4963 + class TraversalIndicatorUpdater final { public: explicit TraversalIndicatorUpdater(const Tree& sup) noexcept : that(sup) { that.traversal_in_progress_ = true; } @@ -923,7 +921,7 @@ class Tree final // NOSONAR cpp:S3624 // including the root node whos `up` points to this origin node (see `isRoot` method). Node origin_node_{}; - // No Sonar cpp:S4963 b/c of implicit modification by the `TraversalIndicatorUpdater` RAII class, + // No Sonar cpp:S3687 b/c of implicit modification by the `TraversalIndicatorUpdater` RAII class, // even for `const` instance of the `Tree` class (hence the `mutable volatile` keywords). mutable volatile bool traversal_in_progress_ = false; // NOSONAR cpp:S3687 };