mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-07 01:59:27 +08:00
Add scripts for running shellcheck/tests interpreted.
This commit is contained in:
5
quickrun
Executable file
5
quickrun
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# quickrun runs ShellCheck in an interpreted mode.
|
||||
# This allows testing changes without recompiling.
|
||||
|
||||
runghc -idist/build/autogen shellcheck.hs "$@"
|
15
quicktest
Executable file
15
quicktest
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# quicktest runs the ShellCheck unit tests in an interpreted mode.
|
||||
# This allows running tests without compiling, which can be faster.
|
||||
# 'cabal test' remains the source of truth.
|
||||
|
||||
(
|
||||
var=$(echo 'liftM and $ sequence [ShellCheck.Analytics.runTests, ShellCheck.Parser.runTests, ShellCheck.Checker.runTests]' | cabal repl | tee /dev/stderr)
|
||||
if [[ $var == *$'\nTrue'* ]]
|
||||
then
|
||||
exit 0
|
||||
else
|
||||
grep -C 3 "Fail" <<< "$var"
|
||||
exit 1
|
||||
fi
|
||||
) 2>&1
|
Reference in New Issue
Block a user