aboutsummaryrefslogtreecommitdiff
path: root/clang-tidy/LixClangTidyChecks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tidy/LixClangTidyChecks.cc')
-rw-r--r--clang-tidy/LixClangTidyChecks.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang-tidy/LixClangTidyChecks.cc b/clang-tidy/LixClangTidyChecks.cc
new file mode 100644
index 000000000..b3503dd3a
--- /dev/null
+++ b/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");
+};