make: Do not scan contrib for discouraged functions

This commit is contained in:
Christian Decker 2021-04-28 15:45:44 +02:00 committed by Rusty Russell
parent 6c67afeb03
commit 0f2009c7a3

View File

@ -490,7 +490,7 @@ check-tmpctx:
@if git grep -n 'tal_free[(]tmpctx)' | grep -Ev '^ccan/|/test/|^common/setup.c:|^common/utils.c:'; then echo "Don't free tmpctx!">&2; exit 1; fi
check-discouraged-functions:
@if git grep -E "[^a-z_/](fgets|fputs|gets|scanf|sprintf)\(" -- "*.c" "*.h" ":(exclude)ccan/"; then exit 1; fi
@if git grep -E "[^a-z_/](fgets|fputs|gets|scanf|sprintf)\(" -- "*.c" "*.h" ":(exclude)ccan/" ":(exclude)contrib/"; then exit 1; fi
# Don't access amount_msat and amount_sat members directly without a good reason
# since it risks overflow.