Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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()
4 changes: 3 additions & 1 deletion phlex/app/load_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ namespace phlex::experimental {
template <typename creator_t>
std::function<creator_t> 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.");

Expand Down
4 changes: 2 additions & 2 deletions test/form/toy_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ std::vector<TrackStart> 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);
}
8 changes: 4 additions & 4 deletions test/form/writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ static char const* const seg_id = "[EVENT=%08X;SEG=%08X]";

void generate(std::vector<float>& 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);
}
Expand Down
2 changes: 1 addition & 1 deletion test/hierarchical_nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading