mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 13:11:36 +00:00
feat(tidy): add fairmq-bugprone-run-loop-ignores-state
- Report endless loops (while (true), for (;;), ...) in an override of Device::Run() that do not call NewStatePending() or WaitFor(). Such a device does not stop when a state change is requested. - Skip loops that call Send() or Receive(), which an interrupt stops, and loops with a break, return, throw or goto. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <fairmq/tidy/PartsApiCheck.h>
|
||||
#include <fairmq/tidy/ProgOptionsAccessorsCheck.h>
|
||||
#include <fairmq/tidy/RunDeviceCheck.h>
|
||||
#include <fairmq/tidy/RunLoopIgnoresStateCheck.h>
|
||||
#include <fairmq/tidy/TransferCodeCheck.h>
|
||||
#include <fairmq/tidy/UncheckedTransferResultCheck.h>
|
||||
#include <fairmq/tidy/UseAfterSendCheck.h>
|
||||
@@ -31,6 +32,7 @@ class Module : public clang::tidy::ClangTidyModule
|
||||
void addCheckFactories(clang::tidy::ClangTidyCheckFactories& factories) override
|
||||
{
|
||||
factories.registerCheck<OnDataWithConditionalRunCheck>("fairmq-bugprone-ondata-with-conditionalrun");
|
||||
factories.registerCheck<RunLoopIgnoresStateCheck>("fairmq-bugprone-run-loop-ignores-state");
|
||||
factories.registerCheck<UncheckedTransferResultCheck>("fairmq-bugprone-unchecked-transfer-result");
|
||||
factories.registerCheck<UseAfterSendCheck>("fairmq-bugprone-use-after-send");
|
||||
factories.registerCheck<ChannelsAccessCheck>("fairmq-modernize-channels-access");
|
||||
|
||||
Reference in New Issue
Block a user