mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 13:11:36 +00:00
feat(tidy): add fairmq-performance-channel-lookup-in-loop
- Report GetChannel() and GetChannels() calls in an override of ConditionalRun() or in a loop in an override of Run(). Each call looks up the channel name in a map. - Skip the short form Send(msg, "name"): it is the usual style. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
* copied verbatim in the file "LICENSE" *
|
||||
********************************************************************************/
|
||||
|
||||
#include <fairmq/tidy/ChannelLookupInLoopCheck.h>
|
||||
#include <fairmq/tidy/ChannelsAccessCheck.h>
|
||||
#include <fairmq/tidy/DeprecatedFunctionsCheck.h>
|
||||
#include <fairmq/tidy/DeprecatedHeadersCheck.h>
|
||||
@@ -42,6 +43,7 @@ class Module : public clang::tidy::ClangTidyModule
|
||||
factories.registerCheck<PartsApiCheck>("fairmq-modernize-parts-api");
|
||||
factories.registerCheck<ProgOptionsAccessorsCheck>("fairmq-modernize-progoptions-accessors");
|
||||
factories.registerCheck<RunDeviceCheck>("fairmq-modernize-run-device");
|
||||
factories.registerCheck<ChannelLookupInLoopCheck>("fairmq-performance-channel-lookup-in-loop");
|
||||
factories.registerCheck<TransferCodeCheck>("fairmq-readability-transfer-code");
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user