mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 12:37:14 +08:00
Minor reformatting
This commit is contained in:
@@ -5,12 +5,7 @@ import Shpell.Analytics
|
|||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Text.Parsec.Pos
|
import Text.Parsec.Pos
|
||||||
|
|
||||||
data ShpellComment = ShpellComment { shpellLine :: Int, shpellColumn :: Int, shpellSeverity :: String, shpellComment :: String }
|
shpellCheck :: String -> [ShpellComment]
|
||||||
|
|
||||||
|
|
||||||
instance Show ShpellComment where
|
|
||||||
show c = concat ["(", show $ shpellLine c, ",", show $ shpellColumn c, ") ", shpellSeverity c, ": ", shpellComment c]
|
|
||||||
|
|
||||||
shpellCheck script =
|
shpellCheck script =
|
||||||
let (ParseResult result notes) = parseShell "-" script in
|
let (ParseResult result notes) = parseShell "-" script in
|
||||||
let allNotes = notes ++ (concat $ maybeToList $ do
|
let allNotes = notes ++ (concat $ maybeToList $ do
|
||||||
@@ -21,6 +16,11 @@ shpellCheck script =
|
|||||||
in
|
in
|
||||||
map formatNote $ sortNotes allNotes
|
map formatNote $ sortNotes allNotes
|
||||||
|
|
||||||
|
data ShpellComment = ShpellComment { shpellLine :: Int, shpellColumn :: Int, shpellSeverity :: String, shpellComment :: String }
|
||||||
|
|
||||||
|
|
||||||
|
instance Show ShpellComment where
|
||||||
|
show c = concat ["(", show $ shpellLine c, ",", show $ shpellColumn c, ") ", shpellSeverity c, ": ", shpellComment c]
|
||||||
|
|
||||||
severityToString s =
|
severityToString s =
|
||||||
case s of
|
case s of
|
||||||
|
Reference in New Issue
Block a user