Skip to content

Commit be975e5

Browse files
authored
Add 'EnumTrailingComma: Insert' rule to .clang-format (#699)
1 parent f6ea6f7 commit be975e5

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ SortUsingDeclarations: LexicographicNumeric
1515
InsertNewlineAtEOF: true
1616
LambdaBodyIndentation: OuterScope
1717
MaxEmptyLinesToKeep: 1
18+
EnumTrailingComma: Insert
1819
KeepEmptyLines:
1920
AtStartOfFile: false
2021
AtStartOfBlock: false

modules/performance/include/performance.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ struct PerfAttr {
3030
struct PerfResults {
3131
/// @brief Measured execution time in seconds.
3232
double time_sec = 0.0;
33-
enum class TypeOfRunning : uint8_t { kPipeline, kTaskRun, kNone };
33+
enum class TypeOfRunning : uint8_t {
34+
kPipeline,
35+
kTaskRun,
36+
kNone,
37+
};
3438
TypeOfRunning type_of_running = TypeOfRunning::kNone;
3539
constexpr static double kMaxTime = 10.0;
3640
};

modules/task/include/task.hpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ enum class TypeOfTask : uint8_t {
3434
/// Intel Threading Building Blocks (TBB)
3535
kTBB,
3636
/// Unknown task type
37-
kUnknown
37+
kUnknown,
3838
};
3939

4040
using TaskMapping = std::pair<TypeOfTask, std::string>;
@@ -61,7 +61,7 @@ enum class StatusOfTask : uint8_t {
6161
/// Task is enabled and should be executed
6262
kEnabled,
6363
/// Task is disabled and will be skipped
64-
kDisabled
64+
kDisabled,
6565
};
6666

6767
/// @brief Returns a string representation of the task status.
@@ -96,7 +96,10 @@ inline std::string GetStringTaskType(TypeOfTask type_of_task, const std::string
9696
return type_str + "_" + std::string((*list_settings)["tasks"][type_str]);
9797
}
9898

99-
enum class StateOfTesting : uint8_t { kFunc, kPerf };
99+
enum class StateOfTesting : uint8_t {
100+
kFunc,
101+
kPerf,
102+
};
100103

101104
template <typename InType, typename OutType>
102105
/// @brief Base abstract class representing a generic task with a defined pipeline.
@@ -267,7 +270,7 @@ class Task {
267270
kPreProcessing,
268271
kRun,
269272
kDone,
270-
kException
273+
kException,
271274
} stage_ = PipelineStage::kNone;
272275
};
273276

modules/util/include/util.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ class DestructorFailureFlag {
6464
inline static std::atomic<bool> failure_flag{false};
6565
};
6666

67-
enum class GTestParamIndex : uint8_t { kTaskGetter, kNameTest, kTestParams };
67+
enum class GTestParamIndex : uint8_t {
68+
kTaskGetter,
69+
kNameTest,
70+
kTestParams,
71+
};
6872

6973
std::string GetAbsoluteTaskPath(const std::string &id_path, const std::string &relative_path);
7074
int GetNumThreads();

0 commit comments

Comments
 (0)