Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ jobs:
run: |
echo "github.event_name: ${{ github.event_name }}"

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v47

- name: Print changed files
run: echo "${{ steps.changed-files.outputs.all_changed_files }}"

- name: Add 8G swap (Ubuntu)
# Prevent hitting runner's resource limits when running clang-tidy
if: runner.os == 'Linux'
Expand Down Expand Up @@ -215,6 +222,13 @@ jobs:
- name: make checktws (check trailing whitespace)
run: make checktws

# - name: make buildext
# run: |
# make buildext \
# ${JOB_MAKE_ARGS} \
# CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
# CMAKE_ARGS="-DPYTHON_EXECUTABLE=$(which python3) -DUSE_PYTEST_HELPER_BINDING=ON"

- name: make pilot
run: |
make pilot \
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ find_program(
)
if(USE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-header-filter=/cpp/.\*/modmesh/.\*" "--extra-arg=-std=c++2b")
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "--extra-arg=-std=c++2b")
if(LINT_AS_ERRORS)
set(DO_CLANG_TIDY "${DO_CLANG_TIDY}" "-warnings-as-errors=*")
endif()
Expand Down
3 changes: 2 additions & 1 deletion cpp/binary/pilot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ target_compile_options(
)

if(CLANG_TIDY_EXE AND USE_CLANG_TIDY)
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-header-filter=/cpp/modmesh/python/.*")
set_target_properties(
pilot PROPERTIES
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
Expand Down Expand Up @@ -114,4 +115,4 @@ install(TARGETS pilot
RUNTIME DESTINATION "${INSTALL_PILOTDIR}"
BUNDLE DESTINATION "${INSTALL_PILOTDIR}"
LIBRARY DESTINATION "${INSTALL_PILOTDIR}"
)
)
1 change: 1 addition & 0 deletions cpp/binary/pymod_modmesh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ target_compile_options(
)

if (CLANG_TIDY_EXE AND USE_CLANG_TIDY)
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-header-filter=/cpp/modmesh/python/.*")
set_target_properties(
_modmesh PROPERTIES
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
Expand Down
1 change: 1 addition & 0 deletions cpp/modmesh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ endif () # BUILD_QT
set_target_properties(modmesh_primary PROPERTIES POSITION_INDEPENDENT_CODE ON)

if (CLANG_TIDY_EXE AND USE_CLANG_TIDY)
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-header-filter=/cpp/modmesh/.*")
set_target_properties(
modmesh_primary PROPERTIES
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
Expand Down
Loading