mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-09-18 17:56:55 +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
|
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 ]]."
|
||||||
|
Reference in New Issue
Block a user