aboutsummaryrefslogtreecommitdiff
path: root/clang-tidy/NixClangTidyChecks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tidy/NixClangTidyChecks.cc')
-rw-r--r--clang-tidy/NixClangTidyChecks.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang-tidy/NixClangTidyChecks.cc b/clang-tidy/NixClangTidyChecks.cc
new file mode 100644
index 000000000..8f0309107
--- /dev/null
+++ b/clang-tidy/NixClangTidyChecks.cc
@@ -0,0 +1,17 @@
+#include <clang-tidy/ClangTidyModule.h>
+#include <clang-tidy/ClangTidyModuleRegistry.h>
+#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>("nix-hasprefixsuffix");
+ }
+};
+
+static ClangTidyModuleRegistry::Add<NixClangTidyChecks> X("nix-module", "Adds nix specific checks");
+};