File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,6 +72,12 @@ build:
7272test :
7373 uv run ctest --preset {{ preset}}
7474
75+ # Run cppcheck using the generated compile_commands.json (optional: run `just configure` first)
76+ cppcheck :
77+ @ command -v cppcheck >/ dev/ null 2 >&1 || { echo " cppcheck not found; install it (brew/apt)" ; exit 2 ; }
78+ # Use compile_commands.json so cppcheck picks up include paths from CMake/Conan
79+ COMPILE_COMMANDS_PATH=build/ {{ build_type}} / compile_commands.json; if [ ! -f " $COMPILE_COMMANDS_PATH" ]; then echo " compile_commands.json not found; run 'just configure' first" ; exit 1 ; fi; cppcheck --project=" $COMPILE_COMMANDS_PATH" -v --enable=all --check-level=exhaustive --inline-suppr --suppress=missingIncludeSystem --suppress=unmatchedSuppression || true
80+
7581# Run the compiled leetcode_cpp executable. Depends on `build` so the binary
7682# is up-to-date. Override `run_binary` or `build_type` locally if needed.
7783run : build
You can’t perform that action at this time.
0 commit comments