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:
parent
856d57f7d8
commit
7f5f5b7fb5
|
@ -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 ]]."
|
||||||
|
|
Loading…
Reference in New Issue