Skip to content
Merged
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
6 changes: 5 additions & 1 deletion .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- name: clazy
apt_pgks:
- clazy
- clazy cppcheck

steps:
- name: Install ninja-build tool
Expand All @@ -49,3 +49,7 @@ jobs:
- name: Build Project
id: ctest
run: cmake --build --preset=${{ matrix.config.name }}

- name: Run cppcheck
if: ${{ matrix.config.name == 'clazy' }}
run: cmake --build --preset=${{ matrix.config.name }} --target cppcheck
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,16 @@ if(${PROJECT_NAME}_IS_ROOT_PROJECT)
endif()

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

# TODO once cppcheck is passing change --error-exitcode=1 so CI step fails on new errors
add_custom_target(
cppcheck
COMMENT "Run cppcheck on sources"
USES_TERMINAL
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMAND
${CMAKE_COMMAND} -E env cppcheck --project=${PROJECT_BINARY_DIR}/compile_commands.json --enable=all
--error-exitcode=0 --language=c++ --inline-suppr --quiet --disable=missingInclude,unusedFunction
--check-level=exhaustive --library=qt.cfg -i3rdParty/ --suppress=*:*.moc --suppress=*:*moc_*.cpp -i/cmake/ECM/
-i/cmake/KDAB/
)
1 change: 1 addition & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_CXX_COMPILER" : "clazy",
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
"KDBindings_TESTS" : "ON",
"KDBindings_EXAMPLES" : "ON",
"KDBindings_ERROR_ON_WARNING" : "ON"
Expand Down