mirror of
				https://github.com/koalaman/shellcheck.git
				synced 2025-11-04 17:47:39 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			610 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			610 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/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
 | 
						|
  ,ShellCheck.Checks.Commands.runTests
 | 
						|
  ,ShellCheck.Checks.ShellSupport.runTests
 | 
						|
  ,ShellCheck.AnalyzerLib.runTests
 | 
						|
    ]' | tr -d '\n' | cabal repl 2>&1 | tee /dev/stderr)
 | 
						|
if [[ $var == *$'\nTrue'* ]]
 | 
						|
then
 | 
						|
  exit 0
 | 
						|
else
 | 
						|
  grep -C 3 -e "Fail" -e "Tracing" <<< "$var"
 | 
						|
  exit 1
 | 
						|
fi
 | 
						|
) 2>&1
 |