Module.cxx 679 B

123456789101112131415161718192021222324
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include <clang-tidy/ClangTidyModule.h>
  4. #include <clang-tidy/ClangTidyModuleRegistry.h>
  5. #include "UseCmstrlenCheck.h"
  6. namespace clang {
  7. namespace tidy {
  8. namespace cmake {
  9. class CMakeClangTidyModule : public ClangTidyModule
  10. {
  11. public:
  12. void addCheckFactories(ClangTidyCheckFactories& CheckFactories) override
  13. {
  14. CheckFactories.registerCheck<UseCmstrlenCheck>("cmake-use-cmstrlen");
  15. }
  16. };
  17. static ClangTidyModuleRegistry::Add<CMakeClangTidyModule> X(
  18. "cmake-clang-tidy", "Adds lint checks for the CMake code base.");
  19. }
  20. }
  21. }