mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-09-30 00:39:19 +08:00
Auto-disable SC2119 when disabling SC2120 (fixes #703)
This commit is contained in:
@@ -501,3 +501,13 @@ isCommandSubstitution t = case t of
|
||||
T_DollarBraceCommandExpansion {} -> True
|
||||
T_Backticked {} -> True
|
||||
_ -> False
|
||||
|
||||
|
||||
-- Is this a T_Annotation that ignores a specific code?
|
||||
isAnnotationIgnoringCode code t =
|
||||
case t of
|
||||
T_Annotation _ anns _ -> any hasNum anns
|
||||
_ -> False
|
||||
where
|
||||
hasNum (DisableComment ts) = code == ts
|
||||
hasNum _ = False
|
||||
|
Reference in New Issue
Block a user