mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +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:
@@ -16,11 +16,11 @@
|
||||
|
||||
namespace wpilibws {
|
||||
|
||||
typedef void (*HALCbRegisterIndexedFunc)(int32_t index,
|
||||
HAL_NotifyCallback callback,
|
||||
using HALCbRegisterIndexedFunc = void (*)(int32_t index,
|
||||
HAL_NotifyCallback callback,
|
||||
void* param, HAL_Bool initialNotify);
|
||||
using HALCbRegisterSingleFunc = void (*)(HAL_NotifyCallback callback,
|
||||
void* param, HAL_Bool initialNotify);
|
||||
typedef void (*HALCbRegisterSingleFunc)(HAL_NotifyCallback callback,
|
||||
void* param, HAL_Bool initialNotify);
|
||||
|
||||
// provider generates diffs based on values
|
||||
class HALSimWSHalProvider : public HALSimWSBaseProvider {
|
||||
|
||||
@@ -12,7 +12,7 @@ class HALSimWSProviderAddressableLED : public HALSimWSHalChanProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalChanProvider::HALSimWSHalChanProvider;
|
||||
~HALSimWSProviderAddressableLED();
|
||||
~HALSimWSProviderAddressableLED() override;
|
||||
|
||||
protected:
|
||||
void RegisterCallbacks() override;
|
||||
|
||||
@@ -21,7 +21,7 @@ class HALSimWSProviderAnalogIn : public HALSimWSHalChanProvider {
|
||||
|
||||
protected:
|
||||
void RegisterCallbacks() override;
|
||||
void CancelCallbacks() override;
|
||||
void CancelCallbacks() final;
|
||||
void DoCancelCallbacks();
|
||||
|
||||
private:
|
||||
@@ -45,7 +45,7 @@ class HALSimWSProviderAnalogOut : public HALSimWSHalChanProvider {
|
||||
|
||||
protected:
|
||||
void RegisterCallbacks() override;
|
||||
void CancelCallbacks() override;
|
||||
void CancelCallbacks() final;
|
||||
void DoCancelCallbacks();
|
||||
|
||||
private:
|
||||
|
||||
@@ -14,7 +14,7 @@ class HALSimWSProviderPCM : public HALSimWSHalChanProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalChanProvider::HALSimWSHalChanProvider;
|
||||
~HALSimWSProviderPCM();
|
||||
~HALSimWSProviderPCM() override;
|
||||
|
||||
protected:
|
||||
void RegisterCallbacks() override;
|
||||
|
||||
@@ -16,7 +16,7 @@ class HALSimWSProviderSolenoid : public HALSimWSHalProvider {
|
||||
explicit HALSimWSProviderSolenoid(int32_t pcmChannel, int32_t solenoidChannel,
|
||||
const std::string& key,
|
||||
const std::string& type);
|
||||
~HALSimWSProviderSolenoid();
|
||||
~HALSimWSProviderSolenoid() override;
|
||||
|
||||
protected:
|
||||
void RegisterCallbacks() override;
|
||||
|
||||
Reference in New Issue
Block a user