mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 21:21:37 +00:00
feat(tidy): add fairmq-bugprone-unchecked-transfer-result
- Report Receive() calls whose result is discarded. On a timeout, an error or an interrupt the message stays empty, and only the result tells. - Report Send() too with the option CheckSend: true. Off by default, because many devices ignore the result of Send() on purpose. - A cast to void discards the result on purpose and is not reported. - Add Transfer.h with matchers for Send() and Receive() of Device, Channel and Socket, and isDiscarded(), for this and later checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <fairmq/tidy/PartsApiCheck.h>
|
||||
#include <fairmq/tidy/ProgOptionsAccessorsCheck.h>
|
||||
#include <fairmq/tidy/RunDeviceCheck.h>
|
||||
#include <fairmq/tidy/UncheckedTransferResultCheck.h>
|
||||
|
||||
#include <clang-tidy/ClangTidyModule.h>
|
||||
#include <clang-tidy/ClangTidyModuleRegistry.h>
|
||||
@@ -26,6 +27,7 @@ class Module : public clang::tidy::ClangTidyModule
|
||||
public:
|
||||
void addCheckFactories(clang::tidy::ClangTidyCheckFactories& factories) override
|
||||
{
|
||||
factories.registerCheck<UncheckedTransferResultCheck>("fairmq-bugprone-unchecked-transfer-result");
|
||||
factories.registerCheck<ChannelsAccessCheck>("fairmq-modernize-channels-access");
|
||||
factories.registerCheck<DeprecatedFunctionsCheck>("fairmq-modernize-deprecated-functions");
|
||||
factories.registerCheck<DeprecatedHeadersCheck>("fairmq-modernize-deprecated-headers");
|
||||
|
||||
Reference in New Issue
Block a user