mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-07 20:23:03 +08:00
Make SC1035 emit a proper end column
Example JSON output: ``` $ shellcheck -s bash -f json /dev/stdin <<< "[[0 -eq 1 ]]" [{"file":"/tmp/zshNCNwPz","line":1,"column":1,"endColumn":3,"level":"error","code":1035,"message":"You need a space after the [[ and before the ]]."}] ```
This commit is contained in:
@@ -814,7 +814,7 @@ readCondition = called "test expression" $ do
|
||||
pos <- getPosition
|
||||
space <- allspacing
|
||||
when (null space) $
|
||||
parseProblemAt pos ErrorC 1035 $ "You need a space after the " ++
|
||||
parseProblemAtWithEnd opos pos ErrorC 1035 $ "You need a space after the " ++
|
||||
if single
|
||||
then "[ and before the ]."
|
||||
else "[[ and before the ]]."
|
||||
|
Reference in New Issue
Block a user