mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-15 01:23:07 -07:00
Auto-disable SC2119 when disabling SC2120 (fixes #703)
This commit is contained in:
parent
301705edea
commit
bf1003eae3
4 changed files with 29 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue