2024-03-18 02:54:58 +00:00
|
|
|
#include <clang-tidy/ClangTidyModule.h>
|
|
|
|
#include <clang-tidy/ClangTidyModuleRegistry.h>
|
2024-03-30 03:26:38 +00:00
|
|
|
#include "FixIncludes.hh"
|
2024-03-18 02:54:58 +00:00
|
|
|
#include "HasPrefixSuffix.hh"
|
|
|
|
|
|
|
|
namespace nix::clang_tidy {
|
|
|
|
using namespace clang;
|
|
|
|
using namespace clang::tidy;
|
|
|
|
|
|
|
|
class NixClangTidyChecks : public ClangTidyModule {
|
|
|
|
public:
|
|
|
|
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
|
2024-03-30 03:26:38 +00:00
|
|
|
CheckFactories.registerCheck<HasPrefixSuffixCheck>("lix-hasprefixsuffix");
|
|
|
|
CheckFactories.registerCheck<FixIncludesCheck>("lix-fixincludes");
|
2024-03-18 02:54:58 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-03-30 03:26:38 +00:00
|
|
|
static ClangTidyModuleRegistry::Add<NixClangTidyChecks> X("lix-module", "Adds lix specific checks");
|
2024-03-18 02:54:58 +00:00
|
|
|
};
|