Browse Source

tools/check-setup_locale.sh: don't get caught by main in non-C files.

We're about to put one in configure.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
connected_hook
Rusty Russell 6 years ago
parent
commit
2db84d6653
  1. 2
      tools/check-setup_locale.sh

2
tools/check-setup_locale.sh

@ -1,7 +1,7 @@
#!/usr/bin/env bash
EXIT_CODE=0
for FILE in $(git grep -lE 'int main\(' | grep -vE '^ccan/'); do
for FILE in $(git grep -lE 'int main\(' | grep -vE '^ccan/' | grep '.c$'); do
if ! grep -q 'setup_locale();' "${FILE}"; then
echo "main(...) in ${FILE} does not call setup_locale() (see common/utils.h)"
EXIT_CODE=1

Loading…
Cancel
Save