Skip to content

Commit

Permalink
patch fix-cppcheck.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
rustyrussell authored and cdecker committed Nov 1, 2022
1 parent 360b33f commit 686baf2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ PYTHON_GENERATED= \
contrib/pyln-testing/pyln/testing/node_pb2.py \
contrib/pyln-testing/pyln/testing/grpc2py.py

# Options to pass to cppcheck. Mostly used to exclude files that are
# generated with external tools that we don't have control over
CPPCHECK_OPTS=-q --language=c --std=c11 --error-exitcode=1 --suppressions-list=.cppcheck-suppress --inline-suppr

# This is where we add new features as bitcoin adds them.
FEATURES :=

Expand Down Expand Up @@ -546,6 +542,10 @@ check-includes: check-src-includes check-hdr-includes
.cppcheck-suppress:
@git ls-files -- "*.c" "*.h" | grep -vE '^(ccan|contrib)/' | xargs grep -n '_for_each' | sed 's/\([^:]*:.*\):.*/uninitvar:\1/' > $@

# Options to pass to cppcheck. Mostly used to exclude files that are
# generated with external tools that we don't have control over
CPPCHECK_OPTS=-q --language=c --std=c11 --error-exitcode=1 --suppressions-list=.cppcheck-suppress --inline-suppr -I $(CCANDIR) $(EXTERNAL_INCLUDE_FLAGS) -j4

check-cppcheck: .cppcheck-suppress
@trap 'rm -f .cppcheck-suppress' 0; git ls-files -- "*.c" "*.h" | grep -vE '^ccan/' | xargs cppcheck ${CPPCHECK_OPTS}

Expand Down

0 comments on commit 686baf2

Please sign in to comment.