File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ redundantImportTests = testGroup "redundant import code actions" [
276276 -- provides workspace edit property which skips round trip to
277277 -- the server
278278 contents <- documentContents doc
279- liftIO $ contents @?= " module CodeActionRedundant where\n main :: IO ()\n main = putStrLn \" hello\" "
279+ liftIO $ contents @?= " {-# OPTIONS_GHC -Wunused-imports #-} \n module CodeActionRedundant where\n main :: IO ()\n main = putStrLn \" hello\"\n "
280280
281281 , testCase " doesn't touch other imports" $ runSession hlsCommand noLiteralCaps " test/testdata/redundantImportTest/" $ do
282282 doc <- openDoc " src/MultipleImports.hs" " haskell"
@@ -285,7 +285,8 @@ redundantImportTests = testGroup "redundant import code actions" [
285285 executeCommand cmd
286286 contents <- documentContents doc
287287 liftIO $ (T. lines contents) @?=
288- [ " module MultipleImports where"
288+ [ " {-# OPTIONS_GHC -Wunused-imports #-}"
289+ , " module MultipleImports where"
289290 , " import Data.Maybe"
290291 , " foo :: Int"
291292 , " foo = fromJust (Just 3)"
Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ module Highlight where
22foo :: Int
33foo = 3
44bar = foo
5- where baz = let x = foo in x
5+ where baz = let x = foo in id x
Original file line number Diff line number Diff line change 1+ {-# OPTIONS_GHC -Wunused-imports #-}
12module CodeActionRedundant where
23import Data.List
34main :: IO ()
4- main = putStrLn " hello"
5+ main = putStrLn " hello"
Original file line number Diff line number Diff line change 1+ {-# OPTIONS_GHC -Wunused-imports #-}
12module MultipleImports where
23import Data.Foldable
34import Data.Maybe
You can’t perform that action at this time.
0 commit comments