Bug 1804489 - Disable browser_dbg-inspector-integration.js on all platforms because...
[gecko.git] / build / clang-plugin / MozillaTidyModule.cpp
blobb1870e745414c50b45d6926b1ce706bf374a164f
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifdef CLANG_TIDY
7 #include "../ClangTidy.h"
8 #include "../ClangTidyModule.h"
9 #include "../ClangTidyModuleRegistry.h"
10 #include "ChecksIncludes.inc"
11 #include "external/ExternalIncludes.inc"
12 #ifdef MOZ_CLANG_PLUGIN_ALPHA
13 #include "alpha/AlphaIncludes.inc"
14 #endif
16 using namespace clang::ast_matchers;
18 namespace clang {
19 namespace tidy {
21 class MozillaModule : public ClangTidyModule {
22 public:
23 void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
24 #define CHECK(cls, name) CheckFactories.registerCheck<cls>("mozilla-" name);
25 #include "Checks.inc"
26 #include "external/ExternalChecks.inc"
27 #ifdef MOZ_CLANG_PLUGIN_ALPHA
28 #include "alpha/AlphaChecks.inc"
29 #endif
30 #undef CHECK
34 // Register the MozillaTidyModule using this statically initialized variable.
35 static ClangTidyModuleRegistry::Add<MozillaModule>
36 X("mozilla-module", "Adds Mozilla lint checks.");
38 } // namespace tidy
39 } // namespace clang
41 // This anchor is used to force the linker to link in the generated object file
42 // and thus register the MozillaModule.
43 volatile int MozillaModuleAnchorSource = 0;
45 #endif