diff options
Diffstat (limited to 'subprojects/lix-clang-tidy/LixClangTidyChecks.cc')
-rw-r--r-- | subprojects/lix-clang-tidy/LixClangTidyChecks.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/subprojects/lix-clang-tidy/LixClangTidyChecks.cc b/subprojects/lix-clang-tidy/LixClangTidyChecks.cc new file mode 100644 index 000000000..b3503dd3a --- /dev/null +++ b/subprojects/lix-clang-tidy/LixClangTidyChecks.cc @@ -0,0 +1,19 @@ +#include <clang-tidy/ClangTidyModule.h> +#include <clang-tidy/ClangTidyModuleRegistry.h> +#include "FixIncludes.hh" +#include "HasPrefixSuffix.hh" + +namespace nix::clang_tidy { +using namespace clang; +using namespace clang::tidy; + +class NixClangTidyChecks : public ClangTidyModule { + public: + void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { + CheckFactories.registerCheck<HasPrefixSuffixCheck>("lix-hasprefixsuffix"); + CheckFactories.registerCheck<FixIncludesCheck>("lix-fixincludes"); + } +}; + +static ClangTidyModuleRegistry::Add<NixClangTidyChecks> X("lix-module", "Adds lix specific checks"); +}; |