diff --git a/CMakeLists.txt b/CMakeLists.txt index 2392cc83e3..7c4db92b59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,7 +65,7 @@ endif() find_package(Doxygen) if(DOXYGEN_FOUND) - add_custom_target(tint_docs ALL + add_custom_target(tint-docs ALL COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating API documentation" @@ -159,3 +159,14 @@ if (${TINT_BUILD_FUZZERS}) add_subdirectory(fuzz) endif() +add_custom_target(tint-lint + COMMAND ./tools/lint + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + COMMENT "Running linter" + VERBATIM) + +add_custom_target(tint-format + COMMAND ./tools/format + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + COMMENT "Running formatter" + VERBATIM) diff --git a/tools/lint b/tools/lint index 0afb012bf4..35d88d423a 100755 --- a/tools/lint +++ b/tools/lint @@ -15,5 +15,5 @@ set -e # fail on error -./third_party/cpplint/cpplint/cpplint.py `find src -type f` -./third_party/cpplint/cpplint/cpplint.py `find samples -type f` +./third_party/cpplint/cpplint/cpplint.py --root=. `find src -type f` +./third_party/cpplint/cpplint/cpplint.py --root=. `find samples -type f`