a5f0954c29
This lets us ensure that nobody is putting in new reinterpret_cast instances where they could safely use charptr_cast instead. Change-Id: I6358a3934c8133c7150042635843bdbb6b9218d4
21 lines
762 B
C++
21 lines
762 B
C++
#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");
|
|
};
|