mirror of
https://github.com/json-c/json-c.git
synced 2026-11-07 22:20:16 +08:00
Add a shellcheck test, fix or ignore all warnings reported by shellcheck.
This commit is contained in:
1 parent
5a79fb68c2
commit
8f191846d5
21 files changed
+163
-94
No files matched your search
+10
-10
@@ -20,20 +20,20 @@
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DBUILD_SHARED_LIBS=OFF ..
|
||||
make -j$(nproc)
|
||||
make -j"$(nproc)"
|
||||
|
||||
LIB=$(pwd)/libjson-c.a
|
||||
cd ..
|
||||
|
||||
# These seem to be set externally, but let's assign defaults to
|
||||
# make it possible to at least partially test this standalone.
|
||||
: ${SRC:=$(dirname "$0")}
|
||||
: ${OUT:=$SRC/out}
|
||||
: ${CXX:=gcc}
|
||||
: ${CXXFLAGS:=}
|
||||
: "${SRC:=$(dirname "$0")}"
|
||||
: "${OUT:=$SRC/out}"
|
||||
: "${CXX:=gcc}"
|
||||
: "${CXXFLAGS:=}"
|
||||
|
||||
[ -d "$OUT" ] || mkdir "$OUT"
|
||||
cp $SRC/*.dict $OUT/.
|
||||
cp "$SRC/*.dict" "$OUT/."
|
||||
|
||||
# XXX this doesn't seem to make much sense, since $SRC is presumably
|
||||
# the "fuzz" directory, which is _inside_ the json-c repo, rather than
|
||||
@@ -44,9 +44,9 @@ INCS=$SRC/json-c
|
||||
|
||||
set -x
|
||||
set -v
|
||||
for f in $SRC/*_fuzzer.cc; do
|
||||
for f in "$SRC"/*_fuzzer.cc; do
|
||||
fuzzer=$(basename "$f" _fuzzer.cc)
|
||||
$CXX $CXXFLAGS -std=c++11 -I$INCS \
|
||||
$SRC/${fuzzer}_fuzzer.cc -o $OUT/${fuzzer}_fuzzer \
|
||||
-lFuzzingEngine $LIB
|
||||
"$CXX" "$CXXFLAGS" -std=c++11 "-I$INCS" \
|
||||
"$SRC/${fuzzer}_fuzzer.cc" -o "$OUT/${fuzzer}_fuzzer" \
|
||||
-lFuzzingEngine "$LIB"
|
||||
done
|
||||
Reference in new issue
Block a user