mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-06 21:11:35 -07:00
Minor renaming and output fixes
This commit is contained in:
parent
5ed89d2241
commit
a8376a09a9
4 changed files with 57 additions and 28 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue