diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e420734..dad56423 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,7 +63,6 @@ option(ENABLE_TSAN "Enable Thread Sanitizer" OFF) option(ENABLE_ASAN "Enable Address Sanitizer" OFF) option(PHLEX_USE_FORM "Enable experimental integration with FORM" OFF) option(ENABLE_COVERAGE "Enable code coverage instrumentation" OFF) -option(ENABLE_CLANG_TIDY "Enable clang-tidy checks during build" OFF) add_compile_options( -Wall @@ -163,22 +162,6 @@ if(ENABLE_COVERAGE) endif() endif() -# Configure clang-tidy integration -find_program(CLANG_TIDY_EXECUTABLE NAMES clang-tidy-20 clang-tidy) - -if(ENABLE_CLANG_TIDY) - if(CLANG_TIDY_EXECUTABLE) - message(STATUS "Found clang-tidy: ${CLANG_TIDY_EXECUTABLE}") - set( - CMAKE_CXX_CLANG_TIDY - ${CLANG_TIDY_EXECUTABLE} - --config-file=${CMAKE_SOURCE_DIR}/.clang-tidy - ) - else() - message(WARNING "clang-tidy not found, disabling clang-tidy checks") - endif() -endif() - if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type" FORCE) endif() @@ -202,10 +185,4 @@ if(BUILD_TESTING) endif() endif() -# Report clang-tidy availability -if(CLANG_TIDY_EXECUTABLE) - message(STATUS "Clang-tidy available: ${CLANG_TIDY_EXECUTABLE}") - message(STATUS "Use -DCMAKE_CXX_CLANG_TIDY=clang-tidy to enable automatic checks during build") -endif() - cet_cmake_config() diff --git a/phlex/app/load_module.cpp b/phlex/app/load_module.cpp index c574d75e..ce2370b8 100644 --- a/phlex/app/load_module.cpp +++ b/phlex/app/load_module.cpp @@ -29,7 +29,9 @@ namespace phlex::experimental { template std::function plugin_loader(std::string const& spec, std::string const& symbol_name) { - char const* plugin_path_ptr = std::getenv("PHLEX_PLUGIN_PATH"); + // Called during single-threaded graph construction + char const* plugin_path_ptr = + std::getenv("PHLEX_PLUGIN_PATH"); // NOLINT(concurrency-mt-unsafe) if (!plugin_path_ptr) throw std::runtime_error("PHLEX_PLUGIN_PATH has not been set."); diff --git a/test/form/toy_tracker.cpp b/test/form/toy_tracker.cpp index bc73069d..34335891 100644 --- a/test/form/toy_tracker.cpp +++ b/test/form/toy_tracker.cpp @@ -19,7 +19,7 @@ std::vector ToyTracker::operator()() int32_t ToyTracker::generateRandom() { //Get a 32-bit random integer with even the lowest allowed precision of rand() - int rand1 = rand() % 32768; - int rand2 = rand() % 32768; + int rand1 = rand() % 32768; // NOLINT(concurrency-mt-unsafe) - Test code, single-threaded + int rand2 = rand() % 32768; // NOLINT(concurrency-mt-unsafe) - Test code, single-threaded return (rand1 * 32768 + rand2); } diff --git a/test/form/writer.cpp b/test/form/writer.cpp index 45462223..a1accc4a 100644 --- a/test/form/writer.cpp +++ b/test/form/writer.cpp @@ -20,12 +20,12 @@ static char const* const seg_id = "[EVENT=%08X;SEG=%08X]"; void generate(std::vector& vrand, int size) { - int rand1 = rand() % 32768; - int rand2 = rand() % 32768; + int rand1 = rand() % 32768; // NOLINT(concurrency-mt-unsafe) - Single-threaded test + int rand2 = rand() % 32768; // NOLINT(concurrency-mt-unsafe) - Single-threaded test int npx = (rand1 * 32768 + rand2) % size; for (int nelement = 0; nelement < npx; ++nelement) { - int rand1 = rand() % 32768; - int rand2 = rand() % 32768; + int rand1 = rand() % 32768; // NOLINT(concurrency-mt-unsafe) - Single-threaded test + int rand2 = rand() % 32768; // NOLINT(concurrency-mt-unsafe) - Single-threaded test float random = float(rand1 * 32768 + rand2) / (32768 * 32768); vrand.push_back(random); } diff --git a/test/hierarchical_nodes.cpp b/test/hierarchical_nodes.cpp index 012c8c82..acc6d351 100644 --- a/test/hierarchical_nodes.cpp +++ b/test/hierarchical_nodes.cpp @@ -67,7 +67,7 @@ namespace { std::string strtime(std::time_t tm) { char buffer[32]; - std::strncpy(buffer, std::ctime(&tm), 26); + std::strncpy(buffer, std::ctime(&tm), 26); // NOLINT(concurrency-mt-unsafe) - Test code return buffer; }