mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-09 08:21:39 +08:00
Minor renaming and output fixes
This commit is contained in:
@@ -52,7 +52,7 @@ instance ToJSON Replacement where
|
||||
"replaceWith" .= str
|
||||
]
|
||||
|
||||
instance ToJSON (PositionedComment) where
|
||||
instance ToJSON PositionedComment where
|
||||
toJSON comment =
|
||||
let start = pcStartPos comment
|
||||
end = pcEndPos comment
|
||||
@@ -82,9 +82,14 @@ instance ToJSON (PositionedComment) where
|
||||
<> "level" .= severityText comment
|
||||
<> "code" .= cCode c
|
||||
<> "message" .= cMessage c
|
||||
<> "replaceWith" .= pcFix comment
|
||||
<> "fix" .= pcFix comment
|
||||
)
|
||||
|
||||
instance ToJSON Fix where
|
||||
toJSON fix = object [
|
||||
"replacements" .= fixReplacements fix
|
||||
]
|
||||
|
||||
outputError file msg = hPutStrLn stderr $ file ++ ": " ++ msg
|
||||
collectResult ref result _ =
|
||||
modifyIORef ref (\x -> crComments result ++ x)
|
||||
|
Reference in New Issue
Block a user