Skip to content

Commit

Permalink
Add test for haskell#2042
Browse files Browse the repository at this point in the history
  • Loading branch information
jneira committed Nov 3, 2021
1 parent 647efd3 commit e703df4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/hls-hlint-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ suggestionsTests =
liftIO $ not (hasApplyAll thirdLine) @? "Unexpected apply all code action"
liftIO $ hasApplyAll multiLine @? "Missing apply all code action"

, testCase "hlint should warn about unused extensions" $ runHlintSession "unusedext" $ do
, knownBrokenForHlintOnRawGhc "[#2042] maybe hlint is ignoring pragmas" $
testCase "hlint should warn about unused extensions" $ runHlintSession "unusedext" $ do
doc <- openDoc "UnusedExtension.hs" "haskell"
diags@(unusedExt:_) <- waitForDiagnosticsFromSource doc "hlint"

Expand All @@ -164,7 +165,7 @@ suggestionsTests =
unusedExt ^. L.code @?= Just (InR "refact:Unused LANGUAGE pragma")

, knownBrokenForHlintOnGhcLib "[#1279] hlint uses a fixed set of extensions" $
testCase "hlint should not activate extensions like PatternSynonyms" $ runHlintSession "" $ do
testCase "hlint should not activate extensions like PatternSynonyms" $ runHlintSession "" $ do
doc <- openDoc "PatternKeyword.hs" "haskell"

waitForAllProgressDone
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{-# LANGUAGE BangPatterns #-}
4 changes: 4 additions & 0 deletions plugins/hls-hlint-plugin/test/testdata/unusedext/hie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cradle:
direct:
arguments:
- "UnusedExtension"

0 comments on commit e703df4

Please sign in to comment.