Skip to content

Commit

Permalink
Use ClangTidy from Noa
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti committed Aug 1, 2023
1 parent d3dc62b commit 5546c31
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 73 deletions.
44 changes: 0 additions & 44 deletions .clang-tidy

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,6 @@ on:
- 'www/**'

jobs:
# Only run clang-tidy on GNU/Linux as a separate jobs
# given how expensive clang-tidy this, even more on
# other platforms.
# clang-tidy:
# runs-on: ubuntu-20.04
# if: github.ref != 'refs/heads/main'
# steps:
# - uses: actions/checkout@v2
# - run: sudo apt-get install --yes clang-tidy
# - run: cmake --version
# - run: cmake --preset release --log-context
# - run: cmake --build --preset release --target clang_tidy

test:
strategy:
fail-fast: false
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ endif()
if(PROJECT_IS_TOP_LEVEL)
file(GLOB_RECURSE JSONBINPACK_CXX_SOURCE_FILES src/*.cc src/*.h test/*.cc test/*.h)
file(GLOB_RECURSE JSONBINPACK_SH_SOURCE_FILES test/*.sh scripts/*.sh)
noa_target_clang_format(SOURCES ${JSONBINPACK_CXX_SOURCE_FILES})
noa_target_clang_tidy(SOURCES ${JSONBINPACK_CXX_SOURCE_FILES})

string(TOLOWER ${CMAKE_BUILD_TYPE} JSONBINPACK_BUILD_TYPE)
set(JSONBINPACK_WEBSITE_OUT ${PROJECT_SOURCE_DIR}/build/${JSONBINPACK_BUILD_TYPE}/www)
set(JSONBINPACK_WEBSITE_SRC ${PROJECT_SOURCE_DIR}/www)
noa_target_clang_format(SOURCES ${JSONBINPACK_CXX_SOURCE_FILES})
include(${PROJECT_SOURCE_DIR}/cmake/clang-tidy.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/bundler.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/jekyll.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/doxygen.cmake)
Expand Down
4 changes: 4 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ debug:
exit 1
endif

.PHONY: clean
lint:
$(CMAKE) --build --preset $(PRESET) --target clang_tidy

.PHONY: clean
clean:
$(CMAKE) -E rm -R -f build .bundle .sass-cache
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ test: .always
$(CMAKE) --build --preset $(PRESET) --parallel
$(CTEST) --preset $(PRESET) --verbose --parallel

lint: .always
$(CMAKE) --build --preset $(PRESET) --target clang_tidy

clean: .always
$(CMAKE) -E rm -R -f build

Expand Down
12 changes: 0 additions & 12 deletions cmake/clang-tidy.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions test/.clang-tidy

This file was deleted.

0 comments on commit 5546c31

Please sign in to comment.