aboutsummaryrefslogtreecommitdiff
path: root/subprojects/lix-clang-tidy/LixClangTidyChecks.cc
blob: 283e0e7c809c4ae54b4d161b203669b8ca6aeb86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <clang-tidy/ClangTidyModule.h>
#include <clang-tidy/ClangTidyModuleRegistry.h>
#include "FixIncludes.hh"
#include "HasPrefixSuffix.hh"
#include "CharPtrCast.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");
            CheckFactories.registerCheck<CharPtrCastCheck>("lix-charptrcast");
        }
};

static ClangTidyModuleRegistry::Add<NixClangTidyChecks> X("lix-module", "Adds lix specific checks");
};