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
22
22
type : git
23
23
location : git://github.com/haskell/haskell-language-server.git
24
24
25
+ common warnings
26
+ ghc-options : -Wall -Wunused-packages
27
+
25
28
library
29
+ import : warnings
26
30
exposed-modules :
27
31
Ide.Plugin.Fourmolu
28
32
hs-source-dirs : src
29
- ghc-options : -Wall
30
33
build-depends :
31
34
, base >= 4.12 && < 5
32
35
, filepath
33
36
, fourmolu ^>= 0.14
34
- , ghc
35
37
, ghc-boot-th
36
38
, ghcide == 2.6.0.0
37
39
, hls-plugin-api == 2.6.0.0
@@ -45,17 +47,17 @@ library
45
47
default-language : Haskell2010
46
48
47
49
test-suite tests
50
+ import : warnings
48
51
type : exitcode-stdio-1.0
49
52
default-language : Haskell2010
50
53
hs-source-dirs : test
51
54
main-is : Main.hs
52
- ghc-options : -Wall - threaded -rtsopts -with-rtsopts=-N
55
+ ghc-options : -threaded -rtsopts -with-rtsopts=-N
53
56
build-tool-depends :
54
57
fourmolu :fourmolu
55
58
build-depends :
56
59
, base >= 4.12 && < 5
57
60
, aeson
58
- , containers
59
61
, filepath
60
62
, hls-fourmolu-plugin
61
63
, hls-plugin-api
Original file line number Diff line number Diff line change @@ -22,18 +22,20 @@ source-repository head
22
22
type : git
23
23
location : https://github.com/haskell/haskell-language-server.git
24
24
25
+ common warnings
26
+ ghc-options : -Wall -Wunused-packages
27
+
25
28
library
29
+ import : warnings
26
30
exposed-modules : Ide.Plugin.Ormolu
27
31
hs-source-dirs : src
28
32
build-depends :
29
33
, base >= 4.12 && < 5
30
34
, extra
31
35
, filepath
32
- , ghc
33
36
, ghc-boot-th
34
37
, ghcide == 2.6.0.0
35
38
, hls-plugin-api == 2.6.0.0
36
- , lens
37
39
, lsp
38
40
, mtl
39
41
, process-extras >= 0.7.1
@@ -44,6 +46,7 @@ library
44
46
default-language : Haskell2010
45
47
46
48
test-suite tests
49
+ import : warnings
47
50
type : exitcode-stdio-1.0
48
51
default-language : Haskell2010
49
52
hs-source-dirs : test
@@ -54,11 +57,9 @@ test-suite tests
54
57
build-depends :
55
58
, base
56
59
, aeson
57
- , containers
58
60
, filepath
59
61
, hls-ormolu-plugin
60
62
, hls-plugin-api
61
63
, hls-test-utils == 2.6.0.0
62
64
, lsp-types
63
- , text
64
65
, ormolu
Original file line number Diff line number Diff line change @@ -16,13 +16,10 @@ where
16
16
import Control.Exception (Handler (.. ), IOException ,
17
17
SomeException (.. ), catches ,
18
18
handle )
19
- import Control.Monad.Except (ExceptT (ExceptT ), runExceptT ,
20
- throwError )
19
+ import Control.Monad.Except (runExceptT , throwError )
21
20
import Control.Monad.Extra
22
- import Control.Monad.IO.Class (liftIO )
23
21
import Control.Monad.Trans
24
- import Control.Monad.Trans.Except (ExceptT (.. ), mapExceptT ,
25
- runExceptT )
22
+ import Control.Monad.Trans.Except (ExceptT (.. ), mapExceptT )
26
23
import Data.Functor ((<&>) )
27
24
import Data.List (intercalate )
28
25
import Data.Maybe (catMaybes )
@@ -38,7 +35,6 @@ import Ide.Plugin.Properties
38
35
import Ide.PluginUtils
39
36
import Ide.Types hiding (Config )
40
37
import qualified Ide.Types as Types
41
- import Language.LSP.Protocol.Message
42
38
import Language.LSP.Protocol.Types
43
39
import Language.LSP.Server hiding (defaultConfig )
44
40
import Ormolu
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ module Main
5
5
) where
6
6
7
7
import Data.Aeson
8
+ import qualified Data.Aeson.KeyMap as KM
8
9
import Data.Functor
9
- import qualified Data.Text as T
10
10
import Ide.Plugin.Config
11
11
import qualified Ide.Plugin.Ormolu as Ormolu
12
12
import Language.LSP.Protocol.Types
@@ -34,9 +34,10 @@ tests = testGroup "ormolu" $
34
34
]
35
35
36
36
goldenWithOrmolu :: 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"
38
39
where
39
- conf = def{plcConfig = ( \ ( Object obj) -> obj) $ object [" external" .= cli]}
40
+ conf = def{plcConfig = KM. fromList [" external" .= cli]}
40
41
41
42
testDataDir :: FilePath
42
43
testDataDir = " test" </> " testdata"
You can’t perform that action at this time.
0 commit comments