Skip to content

Commit

Permalink
Disable cppcoreguidelines-avoid-do-while check and fix NOLINTEND issues
Browse files Browse the repository at this point in the history
  • Loading branch information
equeim committed Aug 23, 2024
1 parent ce14bb9 commit fb283a0
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 9 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Checks: >
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-type-static-cast-downcast,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-avoid-do-while
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-macro-usage,
Expand Down
2 changes: 2 additions & 0 deletions src/coroutines/coroutines_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ namespace tremotesf {
};
}

// NOLINTEND(cppcoreguidelines-avoid-reference-coroutine-parameters)

QTEST_GUILESS_MAIN(tremotesf::CoroutinesTest)

#include "coroutines_test.moc"
2 changes: 0 additions & 2 deletions src/itemlistupdater_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#include "itemlistupdater.h"
#include "stdutils.h"

// NOLINTBEGIN(cppcoreguidelines-avoid-do-while)

struct Item {
int id;
QString data;
Expand Down
2 changes: 0 additions & 2 deletions src/log/demangle_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

#include "demangle.h"

// NOLINTBEGIN(cppcoreguidelines-avoid-do-while)

using namespace tremotesf;

struct Foo {};
Expand Down
2 changes: 0 additions & 2 deletions src/rpc/pathutils_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#include "pathutils.h"

// NOLINTBEGIN(cppcoreguidelines-avoid-do-while)

using namespace tremotesf;

class PathUtilsTest final : public QObject {
Expand Down
4 changes: 3 additions & 1 deletion src/rpc/requestrouter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ using namespace tremotesf::impl;
throw std::exception(); \
} while (false)

// NOLINTBEGIN(bugprone-unchecked-optional-access, cppcoreguidelines-avoid-do-while)
// NOLINTBEGIN(bugprone-unchecked-optional-access)

namespace {
constexpr auto testApiPath = "/"_l1;
Expand Down Expand Up @@ -542,6 +542,8 @@ namespace {
};
}

// NOLINTEND(bugprone-unchecked-optional-access)

QTEST_GUILESS_MAIN(RequestRouterTest)

#include "requestrouter_test.moc"
2 changes: 0 additions & 2 deletions src/rpc/tracker_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include "tracker.h"
#include "torrent.h"

// NOLINTBEGIN(cppcoreguidelines-avoid-do-while)

using namespace tremotesf::impl;

class TrackerTest final : public QObject {
Expand Down

0 comments on commit fb283a0

Please sign in to comment.