Skip to content

Commit fdf649a

Browse files
authored
Fix -Wall and -Wunused-packages in explicit fixity plugin (#3995)
1 parent 26079b5 commit fdf649a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

plugins/hls-explicit-fixity-plugin/hls-explicit-fixity-plugin.cabal

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ source-repository head
1919
type: git
2020
location: https://github.com/haskell/haskell-language-server.git
2121

22+
common warnings
23+
ghc-options:
24+
-Wall -Wunused-packages
25+
-Wno-name-shadowing -Wno-unticked-promoted-constructors
26+
2227
library
28+
import: warnings
2329
exposed-modules: Ide.Plugin.ExplicitFixity
2430

2531
hs-source-dirs: src
@@ -28,22 +34,17 @@ library
2834
, containers
2935
, deepseq
3036
, extra
31-
, ghc
3237
, ghcide == 2.6.0.0
3338
, hashable
3439
, hls-plugin-api == 2.6.0.0
3540
, lsp >=2.3
3641
, text
37-
, transformers
3842

39-
ghc-options:
40-
-Wall
41-
-Wno-name-shadowing
42-
-Wno-unticked-promoted-constructors
4343
default-language: Haskell2010
4444
default-extensions: DataKinds
4545

4646
test-suite tests
47+
import: warnings
4748
type: exitcode-stdio-1.0
4849
default-language: Haskell2010
4950
hs-source-dirs: test

plugins/hls-explicit-fixity-plugin/test/Main.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,10 @@ hoverTest' docName title pos expected = testCase title $ runSessionWithServer de
5656
doc <- openDoc docName "haskell"
5757
waitForKickDone
5858
h <- getHover doc pos
59-
let expected' = "\n" <> sectionSeparator <> expected
6059
case h of
6160
Nothing -> liftIO $ assertFailure "No hover"
6261
Just (Hover contents _) -> case contents of
63-
InL (MarkupContent mk txt) -> do
62+
InL (MarkupContent _ txt) -> do
6463
liftIO
6564
$ assertBool ("Failed to find `" <> T.unpack expected <> "` in hover message: " <> T.unpack txt)
6665
$ expected `T.isInfixOf` txt

0 commit comments

Comments
 (0)