Skip to content

Commit

Permalink
fix: ensure proper shell configuration for cppcheck error propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
1 parent c992bcd commit ee536ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ jobs:
run: cmake --build build

- name: Run cppcheck
shell: bash
run: |
set -eo pipefail # Exit on error and propagate pipe failures
echo "Running static analysis with cppcheck..."
echo "----------------------------------------"
# Run cppcheck with specific checks enabled
set -o pipefail # Make sure pipe failures are propagated
cppcheck \
--enable=all \
--check-level=exhaustive \
Expand All @@ -49,7 +51,9 @@ jobs:
--debug-warnings \
--error-exitcode=1 \
. 2>&1 | tee cppcheck_output.txt
exit ${PIPESTATUS[0]} # Use cppcheck's exit code
# Use cppcheck's exit code
exit ${PIPESTATUS[0]}
echo "----------------------------------------"
echo "Critical Issues:"
Expand Down

0 comments on commit ee536ab

Please sign in to comment.