mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 15:27:02 +08:00
In (( x = y )), logic to not reference x also grabbed y
This commit is contained in:
@@ -520,7 +520,7 @@ getReferencedVariables parents t =
|
||||
isDereferencing = (`elem` ["-eq", "-ne", "-lt", "-le", "-gt", "-ge"])
|
||||
|
||||
isArithmeticAssignment t = case getPath parents t of
|
||||
this: TA_Assignment _ "=" _ _ :_ -> True
|
||||
this: TA_Assignment _ "=" lhs _ :_ -> lhs == t
|
||||
_ -> False
|
||||
|
||||
dataTypeFrom defaultType v = (case v of T_Array {} -> DataArray; _ -> defaultType) $ SourceFrom [v]
|
||||
|
Reference in New Issue
Block a user