From e270d63baeacf1b3917d5dcbb8ea8dae95e5c936 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Wed, 31 Dec 2025 21:58:56 +0100 Subject: [PATCH 1/2] Get rid of .clang-tidy in tests directory --- .clang-tidy | 8 ++++++++ tasks/example_processes/tests/.clang-tidy | 13 ------------- tasks/example_processes_2/tests/.clang-tidy | 13 ------------- tasks/example_threads/tests/.clang-tidy | 13 ------------- 4 files changed, 8 insertions(+), 39 deletions(-) delete mode 100644 tasks/example_processes/tests/.clang-tidy delete mode 100644 tasks/example_processes_2/tests/.clang-tidy delete mode 100644 tasks/example_threads/tests/.clang-tidy diff --git a/.clang-tidy b/.clang-tidy index dffe71a25..eafb20048 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -102,3 +102,11 @@ CheckOptions: value: 1 - key: misc-include-cleaner.IgnoreHeaders value: '(__chrono/.*|stdlib\.h|3rdparty/.*)' + - key: misc-use-anonymous-namespace.IgnoreMacros + value: 1 + - key: cppcoreguidelines-avoid-non-const-global-variables.AllowInternalLinkage + value: 1 + - key: modernize-type-traits.IgnoreMacros + value: 1 + - key: cppcoreguidelines-avoid-goto.IgnoreMacros + value: 1 diff --git a/tasks/example_processes/tests/.clang-tidy b/tasks/example_processes/tests/.clang-tidy deleted file mode 100644 index ef43b7aa8..000000000 --- a/tasks/example_processes/tests/.clang-tidy +++ /dev/null @@ -1,13 +0,0 @@ -InheritParentConfig: true - -Checks: > - -modernize-loop-convert, - -cppcoreguidelines-avoid-goto, - -cppcoreguidelines-avoid-non-const-global-variables, - -misc-use-anonymous-namespace, - -modernize-use-std-print, - -modernize-type-traits - -CheckOptions: - - key: readability-function-cognitive-complexity.Threshold - value: 50 # Relaxed for tests diff --git a/tasks/example_processes_2/tests/.clang-tidy b/tasks/example_processes_2/tests/.clang-tidy deleted file mode 100644 index ef43b7aa8..000000000 --- a/tasks/example_processes_2/tests/.clang-tidy +++ /dev/null @@ -1,13 +0,0 @@ -InheritParentConfig: true - -Checks: > - -modernize-loop-convert, - -cppcoreguidelines-avoid-goto, - -cppcoreguidelines-avoid-non-const-global-variables, - -misc-use-anonymous-namespace, - -modernize-use-std-print, - -modernize-type-traits - -CheckOptions: - - key: readability-function-cognitive-complexity.Threshold - value: 50 # Relaxed for tests diff --git a/tasks/example_threads/tests/.clang-tidy b/tasks/example_threads/tests/.clang-tidy deleted file mode 100644 index ef43b7aa8..000000000 --- a/tasks/example_threads/tests/.clang-tidy +++ /dev/null @@ -1,13 +0,0 @@ -InheritParentConfig: true - -Checks: > - -modernize-loop-convert, - -cppcoreguidelines-avoid-goto, - -cppcoreguidelines-avoid-non-const-global-variables, - -misc-use-anonymous-namespace, - -modernize-use-std-print, - -modernize-type-traits - -CheckOptions: - - key: readability-function-cognitive-complexity.Threshold - value: 50 # Relaxed for tests From 43257e89b77bcd631d2e738191182b3f3ebd8ad5 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Wed, 31 Dec 2025 22:39:28 +0100 Subject: [PATCH 2/2] misc-use-anonymous-namespace --- .clang-tidy | 2 -- tasks/example_processes/tests/performance/main.cpp | 4 ++++ tasks/example_processes_2/tests/performance/main.cpp | 4 ++++ tasks/example_processes_3/tests/performance/main.cpp | 4 ++++ tasks/example_threads/tests/performance/main.cpp | 4 ++++ 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index eafb20048..46f7b558d 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -102,8 +102,6 @@ CheckOptions: value: 1 - key: misc-include-cleaner.IgnoreHeaders value: '(__chrono/.*|stdlib\.h|3rdparty/.*)' - - key: misc-use-anonymous-namespace.IgnoreMacros - value: 1 - key: cppcoreguidelines-avoid-non-const-global-variables.AllowInternalLinkage value: 1 - key: modernize-type-traits.IgnoreMacros diff --git a/tasks/example_processes/tests/performance/main.cpp b/tasks/example_processes/tests/performance/main.cpp index 5d9a4c712..8e0ad1863 100644 --- a/tasks/example_processes/tests/performance/main.cpp +++ b/tasks/example_processes/tests/performance/main.cpp @@ -28,6 +28,8 @@ TEST_P(ExampleRunPerfTestProcesses, RunPerfModes) { ExecuteTest(GetParam()); } +namespace { + const auto kAllPerfTasks = ppc::util::MakeAllPerfTasks(PPC_SETTINGS_example_processes); @@ -37,4 +39,6 @@ const auto kPerfTestName = ExampleRunPerfTestProcesses::CustomPerfTestName; INSTANTIATE_TEST_SUITE_P(RunModeTests, ExampleRunPerfTestProcesses, kGtestValues, kPerfTestName); +} // namespace + } // namespace nesterov_a_test_task_processes diff --git a/tasks/example_processes_2/tests/performance/main.cpp b/tasks/example_processes_2/tests/performance/main.cpp index 23036173c..fffc0af78 100644 --- a/tasks/example_processes_2/tests/performance/main.cpp +++ b/tasks/example_processes_2/tests/performance/main.cpp @@ -28,6 +28,8 @@ TEST_P(ExampleRunPerfTestProcesses2, RunPerfModes) { ExecuteTest(GetParam()); } +namespace { + const auto kAllPerfTasks = ppc::util::MakeAllPerfTasks(PPC_SETTINGS_example_processes_2); @@ -37,4 +39,6 @@ const auto kPerfTestName = ExampleRunPerfTestProcesses2::CustomPerfTestName; INSTANTIATE_TEST_SUITE_P(RunModeTests, ExampleRunPerfTestProcesses2, kGtestValues, kPerfTestName); +} // namespace + } // namespace nesterov_a_test_task_processes_2 diff --git a/tasks/example_processes_3/tests/performance/main.cpp b/tasks/example_processes_3/tests/performance/main.cpp index cae4b67d9..3f01da181 100644 --- a/tasks/example_processes_3/tests/performance/main.cpp +++ b/tasks/example_processes_3/tests/performance/main.cpp @@ -28,6 +28,8 @@ TEST_P(ExampleRunPerfTestProcesses3, RunPerfModes) { ExecuteTest(GetParam()); } +namespace { + const auto kAllPerfTasks = ppc::util::MakeAllPerfTasks(PPC_SETTINGS_example_processes_3); @@ -37,4 +39,6 @@ const auto kPerfTestName = ExampleRunPerfTestProcesses3::CustomPerfTestName; INSTANTIATE_TEST_SUITE_P(RunModeTests, ExampleRunPerfTestProcesses3, kGtestValues, kPerfTestName); +} // namespace + } // namespace nesterov_a_test_task_processes_3 diff --git a/tasks/example_threads/tests/performance/main.cpp b/tasks/example_threads/tests/performance/main.cpp index c59e81742..aad22c736 100644 --- a/tasks/example_threads/tests/performance/main.cpp +++ b/tasks/example_threads/tests/performance/main.cpp @@ -31,6 +31,8 @@ TEST_P(ExampleRunPerfTestThreads, RunPerfModes) { ExecuteTest(GetParam()); } +namespace { + const auto kAllPerfTasks = ppc::util::MakeAllPerfTasks(PPC_SETTINGS_example_threads); @@ -41,4 +43,6 @@ const auto kPerfTestName = ExampleRunPerfTestThreads::CustomPerfTestName; INSTANTIATE_TEST_SUITE_P(RunModeTests, ExampleRunPerfTestThreads, kGtestValues, kPerfTestName); +} // namespace + } // namespace nesterov_a_test_task_threads