mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-27 00:36:02 +08:00
Warn when $? refers to echo or condition (ref #2541)
This commit is contained in:
@@ -804,6 +804,7 @@ fulfillsDependency ctx entry dep =
|
||||
-- it won't be found by the normal check.
|
||||
DepIsRecursive node val | node == entry -> return True
|
||||
DepIsRecursive node val -> return $ val == any (\f -> entryPoint f == node) (cStack ctx)
|
||||
DepExitCodes val -> (== val) <$> peekStack (\s k -> sExitCodes s) S.empty ctx ()
|
||||
-- _ -> error $ "Unknown dep " ++ show dep
|
||||
where
|
||||
peek scope = peekStack getVariableWithScope $ if scope == GlobalScope then (unknownVariableState, GlobalScope) else (unsetVariableState, LocalScope)
|
||||
|
Reference in New Issue
Block a user