[#722] Get encoding from hlint options
This commit is contained in:
parent
0a0cd8041e
commit
5425a09666
@ -22,7 +22,7 @@ lint opt file = ghandle handler $
|
|||||||
withMappedFile file $ \tempfile -> do
|
withMappedFile file $ \tempfile -> do
|
||||||
(flags, classify, hint) <- liftIO $ argsSettings $ optLintHlintOpts opt
|
(flags, classify, hint) <- liftIO $ argsSettings $ optLintHlintOpts opt
|
||||||
hSrc <- liftIO $ openFile tempfile ReadMode
|
hSrc <- liftIO $ openFile tempfile ReadMode
|
||||||
liftIO $ hSetEncoding hSrc utf8
|
liftIO $ hSetEncoding hSrc (encoding flags)
|
||||||
res <- liftIO $ parseModuleEx flags file =<< Just `fmap` hGetContents hSrc
|
res <- liftIO $ parseModuleEx flags file =<< Just `fmap` hGetContents hSrc
|
||||||
case res of
|
case res of
|
||||||
Right m -> pack . map show $ applyHints classify hint [m]
|
Right m -> pack . map show $ applyHints classify hint [m]
|
||||||
|
Loading…
Reference in New Issue
Block a user