-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbitcoin-tidy.cpp
28 lines (23 loc) · 1.15 KB
/
bitcoin-tidy.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2022 Cory Fields
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "EarlyExitTidyModule.h"
#include "ExportMainCheck.h"
#include "InitListCheck.h"
#include "LogPrintfCheck.h"
#include "NoADLCheck.h"
#include <clang-tidy/ClangTidyModule.h>
#include <clang-tidy/ClangTidyModuleRegistry.h>
class BitcoinModule final : public clang::tidy::ClangTidyModule {
public:
void addCheckFactories(clang::tidy::ClangTidyCheckFactories &CheckFactories) override {
CheckFactories.registerCheck<bitcoin::PropagateEarlyExitCheck>("bitcoin-propagate-early-exit");
CheckFactories.registerCheck<bitcoin::LogPrintfCheck>("bitcoin-unterminated-logprintf");
CheckFactories.registerCheck<bitcoin::NoADLCheck>("bitcoin-adl-use");
CheckFactories.registerCheck<bitcoin::ExportMainCheck>("bitcoin-export-main");
CheckFactories.registerCheck<bitcoin::InitListCheck>("bitcoin-init-list");
}
};
static clang::tidy::ClangTidyModuleRegistry::Add<BitcoinModule>
X("bitcoin-module", "Adds bitcoin checks.");
volatile int PropagateEarlyExitCheckAnchorSource = 0;