Skip to content

Commit 2f42755

Browse files
committed
Mark test broken for hlint on ghclib
1 parent 6024c06 commit 2f42755

File tree

1 file changed

+16
-9
lines changed
  • plugins/hls-hlint-plugin/test

1 file changed

+16
-9
lines changed

plugins/hls-hlint-plugin/test/Main.hs

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,25 +87,25 @@ suggestionsTests =
8787
changeDoc doc [change']
8888
testHlintDiagnostics doc
8989

90-
, knownBrokenForGhcVersions [GHC88, GHC86] "hlint doesn't take in account cpp flag as ghc -D argument" $
91-
testCase "hlint diagnostics works with CPP via ghc -XCPP argument (#554)" $ runHlintSession "cpp" $ do
90+
, knownBrokenForHlintOnGhcLib "hlint doesn't take in account cpp flag as ghc -D argument" $
91+
testCase "[#554] hlint diagnostics works with CPP via ghc -XCPP argument" $ runHlintSession "cpp" $ do
9292
doc <- openDoc "CppCond.hs" "haskell"
9393
testHlintDiagnostics doc
9494

95-
, knownBrokenForGhcVersions [GHC88, GHC86] "hlint doesn't take in account cpp flag as ghc -D argument" $
96-
testCase "hlint diagnostics works with CPP via language pragma (#554)" $ runHlintSession "" $ do
95+
, knownBrokenForHlintOnGhcLib "hlint doesn't take in account cpp flag as ghc -D argument" $
96+
testCase "[#554] hlint diagnostics works with CPP via language pragma" $ runHlintSession "" $ do
9797
doc <- openDoc "CppCond.hs" "haskell"
9898
testHlintDiagnostics doc
9999

100-
, testCase "hlint diagnostics works with CPP via -XCPP argument and flag via #include header (#554)" $ runHlintSession "cpp" $ do
100+
, testCase "[#554] hlint diagnostics works with CPP via -XCPP argument and flag via #include header" $ runHlintSession "cpp" $ do
101101
doc <- openDoc "CppHeader.hs" "haskell"
102102
testHlintDiagnostics doc
103103

104-
, testCase "apply-refact works with -XLambdaCase argument (#590)" $ runHlintSession "lambdacase" $ do
104+
, testCase "[#590] apply-refact works with -XLambdaCase argument" $ runHlintSession "lambdacase" $ do
105105
testRefactor "LambdaCase.hs" "Redundant bracket"
106106
expectedLambdaCase
107107

108-
, testCase "apply-refact works with -XTypeApplications argument (#1242)" $ runHlintSession "typeapps" $ do
108+
, testCase "[#1242] apply-refact works with -XTypeApplications argument" $ runHlintSession "typeapps" $ do
109109
testRefactor "TypeApplication.hs" "Redundant bracket"
110110
expectedTypeApp
111111

@@ -131,7 +131,7 @@ suggestionsTests =
131131
doc <- openDoc "IgnoreAnn.hs" "haskell"
132132
expectNoMoreDiagnostics 3 doc "hlint"
133133

134-
, knownBrokenForGhcVersions [GHC810, GHC90] "hlint plugin doesn't honour HLINT annotations (#838)" $
134+
, knownBrokenForHlintOnRawGhc "[#838] hlint plugin doesn't honour HLINT annotations" $
135135
testCase "hlint diagnostics ignore hints honouring HLINT annotations" $ runHlintSession "" $ do
136136
doc <- openDoc "IgnoreAnnHlint.hs" "haskell"
137137
expectNoMoreDiagnostics 3 doc "hlint"
@@ -163,7 +163,8 @@ suggestionsTests =
163163
length diags @?= 1 -- "Eta Reduce" and "Redundant Id"
164164
unusedExt ^. L.code @?= Just (InR "refact:Unused LANGUAGE pragma")
165165

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

169170
waitForAllProgressDone
@@ -301,3 +302,9 @@ hlintConfigWithFlags flags =
301302
where
302303
unObject (Object obj) = obj
303304
unObject _ = undefined
305+
306+
knownBrokenForHlintOnGhcLib :: String -> TestTree -> TestTree
307+
knownBrokenForHlintOnGhcLib = knownBrokenForGhcVersions [GHC88, GHC86]
308+
309+
knownBrokenForHlintOnRawGhc :: String -> TestTree -> TestTree
310+
knownBrokenForHlintOnRawGhc = knownBrokenForGhcVersions [GHC810, GHC90]

0 commit comments

Comments
 (0)