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:
Russell Harmon 2016-06-18 14:59:47 -07:00
parent 856d57f7d8
commit 7f5f5b7fb5
1 changed files with 1 additions and 1 deletions

View File

@ -814,7 +814,7 @@ readCondition = called "test expression" $ do
pos <- getPosition pos <- getPosition
space <- allspacing space <- allspacing
when (null space) $ 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 if single
then "[ and before the ]." then "[ and before the ]."
else "[[ and before the ]]." else "[[ and before the ]]."