Set root folder for linter.

This CL sets the root folder to be used by the linter when determining
header guards.

Bug: tint:23
Change-Id: I52ce8d3cd67e9882d4ea8a2c9cbd2d5d5650d5b7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/17205
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
dan sinclair 2020-03-19 13:03:35 +00:00 committed by dan sinclair
parent 2c56dd9099
commit b595052ea3
2 changed files with 14 additions and 3 deletions

View File

@ -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)

View File

@ -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`