mirror of
				https://github.com/koalaman/shellcheck.git
				synced 2025-11-04 18:28:23 +08:00 
			
		
		
		
	Simplify matchToken
This commit is contained in:
		@@ -1220,10 +1220,7 @@ checkLiteralBreakingTest _ t = sequence_ $
 | 
			
		||||
  where
 | 
			
		||||
    hasEquals = matchToken ('=' `elem`)
 | 
			
		||||
    isNonEmpty = matchToken (not . null)
 | 
			
		||||
    matchToken m t = isJust $ do
 | 
			
		||||
        str <- getLiteralString t
 | 
			
		||||
        guard $ m str
 | 
			
		||||
        return ()
 | 
			
		||||
    matchToken m t = maybe False m (getLiteralString t)
 | 
			
		||||
 | 
			
		||||
    comparisonWarning list = do
 | 
			
		||||
        token <- find hasEquals list
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user