mirror of
https://github.com/google/ormolu.git
synced 2024-12-02 23:43:34 +03:00
Mention name of file even when rendered version fails to parse
Without this info it's hard to know which file from a bulk is problematic.
This commit is contained in:
parent
d82d607b3a
commit
d63eeea3df
@ -60,7 +60,11 @@ ormolu cfg path str = do
|
|||||||
-- same as AST of original snippet module span positions.
|
-- same as AST of original snippet module span positions.
|
||||||
unless (cfgUnsafe cfg) $ do
|
unless (cfgUnsafe cfg) $ do
|
||||||
(_, result1) <-
|
(_, result1) <-
|
||||||
parseModule' cfg OrmoluOutputParsingFailed "<rendered>" (T.unpack txt)
|
parseModule'
|
||||||
|
cfg
|
||||||
|
OrmoluOutputParsingFailed
|
||||||
|
(path ++ "<rendered>")
|
||||||
|
(T.unpack txt)
|
||||||
when (diff result0 result1) $
|
when (diff result0 result1) $
|
||||||
liftIO $ throwIO (OrmoluASTDiffers str txt)
|
liftIO $ throwIO (OrmoluASTDiffers str txt)
|
||||||
return txt
|
return txt
|
||||||
|
Loading…
Reference in New Issue
Block a user