diff --git a/plugins/hls-hlint-plugin/test/Main.hs b/plugins/hls-hlint-plugin/test/Main.hs index b9695f7efb..41c9f03dea 100644 --- a/plugins/hls-hlint-plugin/test/Main.hs +++ b/plugins/hls-hlint-plugin/test/Main.hs @@ -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" @@ -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 diff --git a/plugins/hls-hlint-plugin/test/testdata/unusedext/UnusedExtension.hs b/plugins/hls-hlint-plugin/test/testdata/unusedext/UnusedExtension.hs new file mode 100644 index 0000000000..f652e62f05 --- /dev/null +++ b/plugins/hls-hlint-plugin/test/testdata/unusedext/UnusedExtension.hs @@ -0,0 +1 @@ +{-# LANGUAGE BangPatterns #-} diff --git a/plugins/hls-hlint-plugin/test/testdata/unusedext/hie.yaml b/plugins/hls-hlint-plugin/test/testdata/unusedext/hie.yaml new file mode 100644 index 0000000000..5d6dfc5138 --- /dev/null +++ b/plugins/hls-hlint-plugin/test/testdata/unusedext/hie.yaml @@ -0,0 +1,4 @@ +cradle: + direct: + arguments: + - "UnusedExtension"