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"
|
2024-08-05 05:02:53 +00:00
|
|
|
#include "CharPtrCast.hh"
|
2024-03-18 02:54:58 +00: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 03:26:38 +00:00
|
|
|
CheckFactories.registerCheck<HasPrefixSuffixCheck>("lix-hasprefixsuffix");
|
|
|
|
CheckFactories.registerCheck<FixIncludesCheck>("lix-fixincludes");
|
2024-08-05 05:02:53 +00:00
|
|
|
CheckFactories.registerCheck<CharPtrCastCheck>("lix-charptrcast");
|
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
|
|
|
};
|