mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Finish clang-tidy cleanups (#3003)
* Add .clang-tidy configuration. * A separate .clang-tidy is used for hal includes to suppress modernize-use-using (as these are C headers). * Add NOLINT where necessary for a clean run. * Add clang-tidy job to lint-format workflow. This workflow is now only run on PRs. To reduce runtime, clang-tidy is only run on files changed in the PR. Two wpilibc changes; both are unlikely to break user code: * BuiltInAccelerometer: Make SetRange() final * Counter: Make SetMaxPeriod() final After these cleanups, the only file that does not run cleanly is cscore_raw_cv.h due to it not being standalone.
This commit is contained in:
@@ -73,5 +73,6 @@ TEST(AnalogInSimTests, TestAnalogInInitialization) {
|
||||
EXPECT_TRUE(HAL_kInvalidHandle != analogInHandle);
|
||||
EXPECT_EQ(0, status);
|
||||
EXPECT_STREQ("Initialized", gTestAnalogInCallbackName.c_str());
|
||||
HALSIM_CancelAnalogInInitializedCallback(INDEX_TO_TEST, callbackId);
|
||||
}
|
||||
} // namespace hal
|
||||
|
||||
@@ -73,5 +73,6 @@ TEST(AnalogOutSimTests, TestAnalogOutInitialization) {
|
||||
EXPECT_TRUE(HAL_kInvalidHandle != analogOutHandle);
|
||||
EXPECT_EQ(0, status);
|
||||
EXPECT_STREQ("Initialized", gTestAnalogOutCallbackName.c_str());
|
||||
HALSIM_CancelAnalogOutInitializedCallback(INDEX_TO_TEST, callbackId);
|
||||
}
|
||||
} // namespace hal
|
||||
|
||||
@@ -73,6 +73,7 @@ TEST(DigitalIoSimTests, TestDigitalIoInitialization) {
|
||||
EXPECT_TRUE(HAL_kInvalidHandle != digitalIoHandle);
|
||||
EXPECT_EQ(0, status);
|
||||
EXPECT_STREQ("Initialized", gTestDigitalIoCallbackName.c_str());
|
||||
HALSIM_CancelDIOInitializedCallback(INDEX_TO_TEST, callbackId);
|
||||
}
|
||||
|
||||
} // namespace hal
|
||||
|
||||
@@ -71,5 +71,6 @@ TEST(PWMSimTests, TestPwmInitialization) {
|
||||
EXPECT_TRUE(HAL_kInvalidHandle != pwmHandle);
|
||||
EXPECT_EQ(0, status);
|
||||
EXPECT_STREQ("Initialized", gTestPwmCallbackName.c_str());
|
||||
HALSIM_CancelPWMInitializedCallback(INDEX_TO_TEST, callbackId);
|
||||
}
|
||||
} // namespace hal
|
||||
|
||||
@@ -71,6 +71,7 @@ TEST(RelaySimTests, TestRelayInitialization) {
|
||||
EXPECT_TRUE(HAL_kInvalidHandle != pdpHandle);
|
||||
EXPECT_EQ(0, status);
|
||||
EXPECT_STREQ("InitializedForward", gTestRelayCallbackName.c_str());
|
||||
HALSIM_CancelRelayInitializedForwardCallback(INDEX_TO_TEST, callbackId);
|
||||
}
|
||||
|
||||
} // namespace hal
|
||||
|
||||
Reference in New Issue
Block a user