lint: fix shell lint errors
This commit is contained in:
parent
76f674d63b
commit
bfb7073cf6
@ -9,17 +9,17 @@ set -e
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
PS4='+(${BASH_SOURCE}:${LINENO}): '
|
PS4='+(${BASH_SOURCE}:${LINENO}): '
|
||||||
cd "$(dirname ${BASH_SOURCE[0]})/.."
|
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
||||||
|
|
||||||
# Compile `gas`
|
# Compile `gas`
|
||||||
program="/tmp/gas"
|
gas="/tmp/gas"
|
||||||
go build -o $program ./cmd
|
go build -o $gas ./cmd
|
||||||
|
|
||||||
test_schema_dir="pkg/schema/lint/test_schemas"
|
test_schema_dir="pkg/schema/lint/test_schemas"
|
||||||
|
|
||||||
# Check all failure cases
|
# Check all failure cases
|
||||||
for test_schema in $test_schema_dir/failure-*; do
|
for test_schema in "$test_schema_dir"/failure-*; do
|
||||||
output=$($program sqlite_lint $test_schema) && {
|
output=$($gas sqlite_lint "$test_schema") && {
|
||||||
echo "Expected test to fail"
|
echo "Expected test to fail"
|
||||||
exit 9
|
exit 9
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ done
|
|||||||
|
|
||||||
# Check success case
|
# Check success case
|
||||||
success_schema="$test_schema_dir/success.sql"
|
success_schema="$test_schema_dir/success.sql"
|
||||||
output=$($program sqlite_lint $success_schema) || {
|
output=$($gas sqlite_lint $success_schema) || {
|
||||||
echo "Expected test to succeed"
|
echo "Expected test to succeed"
|
||||||
exit 9
|
exit 9
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user