Skip to content

Commit

Permalink
Fix clang tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
sitaowang1998 committed Dec 21, 2024
1 parent 5e87551 commit 1508038
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/spider/worker/TaskExecutor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ enum class TaskExecutorState : std::uint8_t {

class TaskExecutor {
public:
// NOLINTBEGIN(clang-analyzer-unix.BlockInCriticalSection)
template <class... Args>
TaskExecutor(
boost::asio::io_context& context,
Expand Down Expand Up @@ -115,8 +114,6 @@ class TaskExecutor {
send_message(m_write_pipe, args_request);
}

// NOLINTEND(clang-analyzer-unix.BlockInCriticalSection)

TaskExecutor(TaskExecutor const&) = delete;
auto operator=(TaskExecutor const&) -> TaskExecutor& = delete;
TaskExecutor(TaskExecutor&&) = delete;
Expand Down
2 changes: 1 addition & 1 deletion tests/worker/test-FunctionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <catch2/catch_test_macros.hpp>

#include "../../src/spider/client/Data.hpp"
#include "../../src/spider/client/Driver.hpp"
#include "../../src/spider/client/TaskContext.hpp"
#include "../../src/spider/core/Driver.hpp"
#include "../../src/spider/core/TaskContextImpl.hpp"
#include "../../src/spider/io/MsgPack.hpp" // IWYU pragma: keep
#include "../../src/spider/worker/FunctionManager.hpp"
Expand Down
6 changes: 4 additions & 2 deletions tests/worker/test-TaskExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include <catch2/catch_template_test_macros.hpp>
#include <catch2/catch_test_macros.hpp>

#include "../../src/spider/core/Data.hpp"
#include "../../src/spider/core/Driver.hpp"
#include "../../src/spider/io/BoostAsio.hpp" // IWYU pragma: keep
#include "../../src/spider/io/MsgPack.hpp" // IWYU pragma: keep
#include "../../src/spider/storage/DataStorage.hpp"
Expand All @@ -22,7 +24,7 @@
#include "../../src/spider/worker/TaskExecutor.hpp"
#include "../storage/StorageTestHelper.hpp"

// NOLINTBEGIN(cert-err58-cpp,cppcoreguidelines-avoid-do-while,readability-function-cognitive-complexity,cppcoreguidelines-avoid-non-const-global-variables,cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays)
// NOLINTBEGIN(cert-err58-cpp,cppcoreguidelines-avoid-do-while,readability-function-cognitive-complexity,cppcoreguidelines-avoid-non-const-global-variables,cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays,clang-analyzer-unix.BlockInCriticalSection)

namespace {
auto get_environment_variable() -> absl::flat_hash_map<
Expand Down Expand Up @@ -175,4 +177,4 @@ TEMPLATE_LIST_TEST_CASE(

} // namespace

// NOLINTEND(cert-err58-cpp,cppcoreguidelines-avoid-do-while,readability-function-cognitive-complexity,cppcoreguidelines-avoid-non-const-global-variables,cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays)
// NOLINTEND(cert-err58-cpp,cppcoreguidelines-avoid-do-while,readability-function-cognitive-complexity,cppcoreguidelines-avoid-non-const-global-variables,cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arraysclang-analyzer-unix.BlockInCriticalSection)

0 comments on commit 1508038

Please sign in to comment.