Correct shellcheck errors (and ignore world splitting when we want it)

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
This commit is contained in:
Frederic Martinsons 2020-11-11 09:50:31 +01:00
parent 8f45fbdadd
commit e817a049f0
6 changed files with 7 additions and 3 deletions

View File

@ -2,4 +2,5 @@
set -e
# shellcheck disable=SC2046
black --diff --check $(git ls-files '*.py')

View File

@ -2,4 +2,5 @@
set -e
# shellcheck disable=SC2046
flake8 --max-line-length=88 $(git ls-files '*.py')

View File

@ -3,4 +3,5 @@
set -e
# Ignoring third-party directories that we don't want to parse
# shellcheck disable=SC2046
shellcheck $(git ls-files '*.sh' | grep -Ev "glib/libcharset|glib/dirent")

View File

@ -1,11 +1,11 @@
#!/bin/sh -e
list_leaked_symbols () {
nm -D "$1" | grep ' T ' | cut -f 3 -d ' ' | egrep -v "$2"
nm -D "$1" | grep ' T ' | cut -f 3 -d ' ' | grep -E -v "$2"
}
check_symbols () {
if [ "`list_leaked_symbols "$1" "$2" | wc -l`" -ne 0 ]; then
if [ "$(list_leaked_symbols "$1" "$2" | wc -l)" -ne 0 ]; then
echo File "$1" possibly leaking symbols:
list_leaked_symbols "$1" "$2"
exit 1

View File

@ -1,3 +1,3 @@
#! /bin/sh
do something here
# do something here

View File

@ -41,6 +41,7 @@ echo_v "Running gdb on assert-msg-test"
OUT=$($LIBTOOL --mode=execute gdb --batch -x "${srcdir:-.}/assert-msg-test.gdb" ./assert-msg-test 2> $error_out) || fail "failed to run gdb"
echo_v "Checking if assert message is in __glib_assert_msg"
# shellcheck disable=SC2016
if ! echo "$OUT" | grep -q '^$1.*"GLib:ERROR:.*assert-msg-test.c:.*:.*main.*: assertion failed: (42 < 0)"'; then
fail "__glib_assert_msg does not have assertion message"
fi