From 1477ab98af10532d7f74f51d4f73cf7e7327855a Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sun, 14 Dec 2025 15:01:03 +0100 Subject: [PATCH] Add 'EnumTrailingComma: Insert' rule to .clang-format --- .clang-format | 1 + modules/performance/include/performance.hpp | 6 +++++- modules/task/include/task.hpp | 11 +++++++---- modules/util/include/util.hpp | 6 +++++- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.clang-format b/.clang-format index fac02f27b..98e77c747 100644 --- a/.clang-format +++ b/.clang-format @@ -15,6 +15,7 @@ SortUsingDeclarations: LexicographicNumeric InsertNewlineAtEOF: true LambdaBodyIndentation: OuterScope MaxEmptyLinesToKeep: 1 +EnumTrailingComma: Insert KeepEmptyLines: AtStartOfFile: false AtStartOfBlock: false diff --git a/modules/performance/include/performance.hpp b/modules/performance/include/performance.hpp index 6b74462b0..2b5d1e9fb 100644 --- a/modules/performance/include/performance.hpp +++ b/modules/performance/include/performance.hpp @@ -30,7 +30,11 @@ struct PerfAttr { struct PerfResults { /// @brief Measured execution time in seconds. double time_sec = 0.0; - enum class TypeOfRunning : uint8_t { kPipeline, kTaskRun, kNone }; + enum class TypeOfRunning : uint8_t { + kPipeline, + kTaskRun, + kNone, + }; TypeOfRunning type_of_running = TypeOfRunning::kNone; constexpr static double kMaxTime = 10.0; }; diff --git a/modules/task/include/task.hpp b/modules/task/include/task.hpp index 5cf19331b..d20e8e5e0 100644 --- a/modules/task/include/task.hpp +++ b/modules/task/include/task.hpp @@ -34,7 +34,7 @@ enum class TypeOfTask : uint8_t { /// Intel Threading Building Blocks (TBB) kTBB, /// Unknown task type - kUnknown + kUnknown, }; using TaskMapping = std::pair; @@ -61,7 +61,7 @@ enum class StatusOfTask : uint8_t { /// Task is enabled and should be executed kEnabled, /// Task is disabled and will be skipped - kDisabled + kDisabled, }; /// @brief Returns a string representation of the task status. @@ -96,7 +96,10 @@ inline std::string GetStringTaskType(TypeOfTask type_of_task, const std::string return type_str + "_" + std::string((*list_settings)["tasks"][type_str]); } -enum class StateOfTesting : uint8_t { kFunc, kPerf }; +enum class StateOfTesting : uint8_t { + kFunc, + kPerf, +}; template /// @brief Base abstract class representing a generic task with a defined pipeline. @@ -267,7 +270,7 @@ class Task { kPreProcessing, kRun, kDone, - kException + kException, } stage_ = PipelineStage::kNone; }; diff --git a/modules/util/include/util.hpp b/modules/util/include/util.hpp index ca93fd9b4..0cd063e03 100644 --- a/modules/util/include/util.hpp +++ b/modules/util/include/util.hpp @@ -64,7 +64,11 @@ class DestructorFailureFlag { inline static std::atomic failure_flag{false}; }; -enum class GTestParamIndex : uint8_t { kTaskGetter, kNameTest, kTestParams }; +enum class GTestParamIndex : uint8_t { + kTaskGetter, + kNameTest, + kTestParams, +}; std::string GetAbsoluteTaskPath(const std::string &id_path, const std::string &relative_path); int GetNumThreads();