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