File tree Expand file tree Collapse file tree 4 files changed +17
-17
lines changed Expand file tree Collapse file tree 4 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -22,16 +22,18 @@ source-repository head
2222 type : git
2323 location : git://github.com/haskell/haskell-language-server.git
2424
25+ common warnings
26+ ghc-options : -Wall -Wunused-packages
27+
2528library
29+ import : warnings
2630 exposed-modules :
2731 Ide.Plugin.Fourmolu
2832 hs-source-dirs : src
29- ghc-options : -Wall
3033 build-depends :
3134 , base >= 4.12 && < 5
3235 , filepath
3336 , fourmolu ^>= 0.14
34- , ghc
3537 , ghc-boot-th
3638 , ghcide == 2.6.0.0
3739 , hls-plugin-api == 2.6.0.0
@@ -45,17 +47,17 @@ library
4547 default-language : Haskell2010
4648
4749test-suite tests
50+ import : warnings
4851 type : exitcode-stdio-1.0
4952 default-language : Haskell2010
5053 hs-source-dirs : test
5154 main-is : Main.hs
52- ghc-options : -Wall - threaded -rtsopts -with-rtsopts=-N
55+ ghc-options : -threaded -rtsopts -with-rtsopts=-N
5356 build-tool-depends :
5457 fourmolu :fourmolu
5558 build-depends :
5659 , base >= 4.12 && < 5
5760 , aeson
58- , containers
5961 , filepath
6062 , hls-fourmolu-plugin
6163 , hls-plugin-api
Original file line number Diff line number Diff line change @@ -22,18 +22,20 @@ source-repository head
2222 type : git
2323 location : https://github.com/haskell/haskell-language-server.git
2424
25+ common warnings
26+ ghc-options : -Wall -Wunused-packages
27+
2528library
29+ import : warnings
2630 exposed-modules : Ide.Plugin.Ormolu
2731 hs-source-dirs : src
2832 build-depends :
2933 , base >= 4.12 && < 5
3034 , extra
3135 , filepath
32- , ghc
3336 , ghc-boot-th
3437 , ghcide == 2.6.0.0
3538 , hls-plugin-api == 2.6.0.0
36- , lens
3739 , lsp
3840 , mtl
3941 , process-extras >= 0.7.1
@@ -44,6 +46,7 @@ library
4446 default-language : Haskell2010
4547
4648test-suite tests
49+ import : warnings
4750 type : exitcode-stdio-1.0
4851 default-language : Haskell2010
4952 hs-source-dirs : test
@@ -54,11 +57,9 @@ test-suite tests
5457 build-depends :
5558 , base
5659 , aeson
57- , containers
5860 , filepath
5961 , hls-ormolu-plugin
6062 , hls-plugin-api
6163 , hls-test-utils == 2.6.0.0
6264 , lsp-types
63- , text
6465 , ormolu
Original file line number Diff line number Diff line change @@ -16,13 +16,10 @@ where
1616import Control.Exception (Handler (.. ), IOException ,
1717 SomeException (.. ), catches ,
1818 handle )
19- import Control.Monad.Except (ExceptT (ExceptT ), runExceptT ,
20- throwError )
19+ import Control.Monad.Except (runExceptT , throwError )
2120import Control.Monad.Extra
22- import Control.Monad.IO.Class (liftIO )
2321import Control.Monad.Trans
24- import Control.Monad.Trans.Except (ExceptT (.. ), mapExceptT ,
25- runExceptT )
22+ import Control.Monad.Trans.Except (ExceptT (.. ), mapExceptT )
2623import Data.Functor ((<&>) )
2724import Data.List (intercalate )
2825import Data.Maybe (catMaybes )
@@ -38,7 +35,6 @@ import Ide.Plugin.Properties
3835import Ide.PluginUtils
3936import Ide.Types hiding (Config )
4037import qualified Ide.Types as Types
41- import Language.LSP.Protocol.Message
4238import Language.LSP.Protocol.Types
4339import Language.LSP.Server hiding (defaultConfig )
4440import Ormolu
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ module Main
55 ) where
66
77import Data.Aeson
8+ import qualified Data.Aeson.KeyMap as KM
89import Data.Functor
9- import qualified Data.Text as T
1010import Ide.Plugin.Config
1111import qualified Ide.Plugin.Ormolu as Ormolu
1212import Language.LSP.Protocol.Types
@@ -34,9 +34,10 @@ tests = testGroup "ormolu" $
3434 ]
3535
3636goldenWithOrmolu :: Bool -> TestName -> FilePath -> FilePath -> (TextDocumentIdentifier -> Session () ) -> TestTree
37- goldenWithOrmolu cli title path desc = goldenWithHaskellDocFormatter def ormoluPlugin " ormolu" def title testDataDir path desc " hs"
37+ goldenWithOrmolu cli title path desc =
38+ goldenWithHaskellDocFormatter def ormoluPlugin " ormolu" conf title testDataDir path desc " hs"
3839 where
39- conf = def{plcConfig = ( \ ( Object obj) -> obj) $ object [" external" .= cli]}
40+ conf = def{plcConfig = KM. fromList [" external" .= cli]}
4041
4142testDataDir :: FilePath
4243testDataDir = " test" </> " testdata"
You can’t perform that action at this time.
0 commit comments