From 5d3a133f9f7152492e0bbd6eba13b3826efba7d2 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Tue, 20 Jun 2023 20:29:23 -0700 Subject: [PATCH] Remove spaces in NOLINT comments (#5407) clang-tidy ignores the category filter if there's a space. wpiformat now ignores categories it doesn't understand, so we can remove the spaces. --- ntcore/src/test/native/cpp/ValueTest.cpp | 2 +- .../native/include/frc2/command/CommandPtr.h | 2 +- .../include/frc2/command/PerpetualCommand.h | 2 +- .../native/include/frc2/command/RepeatCommand.h | 2 +- .../native/include/frc2/command/WrapperCommand.h | 2 +- .../native/cpp/frc2/command/CommandPtrTest.cpp | 2 +- wpimath/src/test/native/cpp/DARETest.cpp | 16 ++++++++-------- wpiutil/src/test/native/cpp/ScopeExitTest.cpp | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ntcore/src/test/native/cpp/ValueTest.cpp b/ntcore/src/test/native/cpp/ValueTest.cpp index d49be44d5d..c28078623b 100644 --- a/ntcore/src/test/native/cpp/ValueTest.cpp +++ b/ntcore/src/test/native/cpp/ValueTest.cpp @@ -12,7 +12,7 @@ using namespace std::string_view_literals; -namespace std { // NOLINT (clang-tidy.cert-dcl58-cpp) +namespace std { // NOLINT(clang-tidy.cert-dcl58-cpp) template inline bool operator==(std::span lhs, std::span rhs) { if (lhs.size() != rhs.size()) { diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/CommandPtr.h b/wpilibNewCommands/src/main/native/include/frc2/command/CommandPtr.h index 588bb0be6b..53621ac6d4 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/CommandPtr.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/CommandPtr.h @@ -32,7 +32,7 @@ class CommandPtr final { : m_ptr(std::move(command)) {} template T> - // NOLINTNEXTLINE (bugprone-forwarding-reference-overload) + // NOLINTNEXTLINE(bugprone-forwarding-reference-overload) explicit CommandPtr(T&& command) : CommandPtr( std::make_unique>(std::forward(command))) {} diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/PerpetualCommand.h b/wpilibNewCommands/src/main/native/include/frc2/command/PerpetualCommand.h index 05461e1bf4..e377703481 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/PerpetualCommand.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/PerpetualCommand.h @@ -69,7 +69,7 @@ class PerpetualCommand : public CommandHelper { "be valid. This was unsafe/undefined behavior from the start, and " "RepeatCommand provides an easy way to achieve similar end results " "with slightly different (and safe) semantics.") - // NOLINTNEXTLINE (bugprone-forwarding-reference-overload) + // NOLINTNEXTLINE(bugprone-forwarding-reference-overload) explicit PerpetualCommand(T&& command) : PerpetualCommand( std::make_unique>(std::forward(command))) {} diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/RepeatCommand.h b/wpilibNewCommands/src/main/native/include/frc2/command/RepeatCommand.h index 9639928161..7ae603fcf7 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/RepeatCommand.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/RepeatCommand.h @@ -46,7 +46,7 @@ class RepeatCommand : public CommandHelper { * @param command the command to run repeatedly */ template T> - // NOLINTNEXTLINE (bugprone-forwarding-reference-overload) + // NOLINTNEXTLINE(bugprone-forwarding-reference-overload) explicit RepeatCommand(T&& command) : RepeatCommand( std::make_unique>(std::forward(command))) {} diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/WrapperCommand.h b/wpilibNewCommands/src/main/native/include/frc2/command/WrapperCommand.h index bb5c1790e2..c467746704 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/WrapperCommand.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/WrapperCommand.h @@ -41,7 +41,7 @@ class WrapperCommand : public CommandHelper { * command or add it to a group will throw an exception. */ template T> - // NOLINTNEXTLINE (bugprone-forwarding-reference-overload) + // NOLINTNEXTLINE(bugprone-forwarding-reference-overload) explicit WrapperCommand(T&& command) : WrapperCommand( std::make_unique>(std::forward(command))) {} diff --git a/wpilibNewCommands/src/test/native/cpp/frc2/command/CommandPtrTest.cpp b/wpilibNewCommands/src/test/native/cpp/frc2/command/CommandPtrTest.cpp index 64b0346767..6c57c7f9fa 100644 --- a/wpilibNewCommands/src/test/native/cpp/frc2/command/CommandPtrTest.cpp +++ b/wpilibNewCommands/src/test/native/cpp/frc2/command/CommandPtrTest.cpp @@ -27,7 +27,7 @@ TEST_F(CommandPtrTest, MovedFrom) { EXPECT_NO_FATAL_FAILURE(scheduler.Cancel(movedTo)); EXPECT_THROW(scheduler.Schedule(movedFrom), frc::RuntimeError); - // NOLINTNEXTLINE (clang-analyzer-cplusplus.Move) + // NOLINTNEXTLINE(clang-analyzer-cplusplus.Move) EXPECT_THROW(movedFrom.IsScheduled(), frc::RuntimeError); EXPECT_THROW(static_cast(std::move(movedFrom).Repeatedly()), frc::RuntimeError); diff --git a/wpimath/src/test/native/cpp/DARETest.cpp b/wpimath/src/test/native/cpp/DARETest.cpp index d57323354c..51397bfbf4 100644 --- a/wpimath/src/test/native/cpp/DARETest.cpp +++ b/wpimath/src/test/native/cpp/DARETest.cpp @@ -71,7 +71,7 @@ void ExpectDARESolution(const Eigen::Ref& A, ExpectMatrixEqual(Y, Eigen::MatrixXd::Zero(X.rows(), X.cols()), 1e-10); } -// NOLINTNEXTLINE (google-readability-avoid-underscore-in-googletest-name) +// NOLINTNEXTLINE(google-readability-avoid-underscore-in-googletest-name) TEST(DARETest, NonInvertibleA_ABQR) { // Example 2 of "On the Numerical Solution of the Discrete-Time Algebraic // Riccati Equation" @@ -91,7 +91,7 @@ TEST(DARETest, NonInvertibleA_ABQR) { ExpectDARESolution(A, B, Q, R, X); } -// NOLINTNEXTLINE (google-readability-avoid-underscore-in-googletest-name) +// NOLINTNEXTLINE(google-readability-avoid-underscore-in-googletest-name) TEST(DARETest, NonInvertibleA_ABQRN) { // Example 2 of "On the Numerical Solution of the Discrete-Time Algebraic // Riccati Equation" @@ -117,7 +117,7 @@ TEST(DARETest, NonInvertibleA_ABQRN) { ExpectDARESolution(A, B, Q, R, N, X); } -// NOLINTNEXTLINE (google-readability-avoid-underscore-in-googletest-name) +// NOLINTNEXTLINE(google-readability-avoid-underscore-in-googletest-name) TEST(DARETest, InvertibleA_ABQR) { Eigen::MatrixXd A{2, 2}; A << 1, 1, 0, 1; @@ -134,7 +134,7 @@ TEST(DARETest, InvertibleA_ABQR) { ExpectDARESolution(A, B, Q, R, X); } -// NOLINTNEXTLINE (google-readability-avoid-underscore-in-googletest-name) +// NOLINTNEXTLINE(google-readability-avoid-underscore-in-googletest-name) TEST(DARETest, InvertibleA_ABQRN) { Eigen::MatrixXd A{2, 2}; A << 1, 1, 0, 1; @@ -157,7 +157,7 @@ TEST(DARETest, InvertibleA_ABQRN) { ExpectDARESolution(A, B, Q, R, N, X); } -// NOLINTNEXTLINE (google-readability-avoid-underscore-in-googletest-name) +// NOLINTNEXTLINE(google-readability-avoid-underscore-in-googletest-name) TEST(DARETest, FirstGeneralizedEigenvalueOfSTIsStable_ABQR) { // The first generalized eigenvalue of (S, T) is stable @@ -176,7 +176,7 @@ TEST(DARETest, FirstGeneralizedEigenvalueOfSTIsStable_ABQR) { ExpectDARESolution(A, B, Q, R, X); } -// NOLINTNEXTLINE (google-readability-avoid-underscore-in-googletest-name) +// NOLINTNEXTLINE(google-readability-avoid-underscore-in-googletest-name) TEST(DARETest, FirstGeneralizedEigenvalueOfSTIsStable_ABQRN) { // The first generalized eigenvalue of (S, T) is stable @@ -201,7 +201,7 @@ TEST(DARETest, FirstGeneralizedEigenvalueOfSTIsStable_ABQRN) { ExpectDARESolution(A, B, Q, R, N, X); } -// NOLINTNEXTLINE (google-readability-avoid-underscore-in-googletest-name) +// NOLINTNEXTLINE(google-readability-avoid-underscore-in-googletest-name) TEST(DARETest, IdentitySystem_ABQR) { const Eigen::MatrixXd A{Eigen::Matrix2d::Identity()}; const Eigen::MatrixXd B{Eigen::Matrix2d::Identity()}; @@ -214,7 +214,7 @@ TEST(DARETest, IdentitySystem_ABQR) { ExpectDARESolution(A, B, Q, R, X); } -// NOLINTNEXTLINE (google-readability-avoid-underscore-in-googletest-name) +// NOLINTNEXTLINE(google-readability-avoid-underscore-in-googletest-name) TEST(DARETest, IdentitySystem_ABQRN) { const Eigen::MatrixXd A{Eigen::Matrix2d::Identity()}; const Eigen::MatrixXd B{Eigen::Matrix2d::Identity()}; diff --git a/wpiutil/src/test/native/cpp/ScopeExitTest.cpp b/wpiutil/src/test/native/cpp/ScopeExitTest.cpp index 6549c81c56..e131694d11 100644 --- a/wpiutil/src/test/native/cpp/ScopeExitTest.cpp +++ b/wpiutil/src/test/native/cpp/ScopeExitTest.cpp @@ -23,7 +23,7 @@ TEST(ScopeExitTest, Release) { { wpi::scope_exit exit1{[&] { ++exitCount; }}; wpi::scope_exit exit2 = std::move(exit1); - // NOLINTNEXTLINE (clang-analyzer-cplusplus.Move) + // NOLINTNEXTLINE(clang-analyzer-cplusplus.Move) wpi::scope_exit exit3 = std::move(exit1); EXPECT_EQ(0, exitCount); }