File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,22 @@ hlintTests = testGroup "hlint suggestions" [
95
95
96
96
liftIO $ noHlintDiagnostics diags'
97
97
98
+ , testCase " changing document contents updates hlint diagnostics" $ runHlintSession " " $ do
99
+ doc <- openDoc " ApplyRefact2.hs" " haskell"
100
+ testHlintDiagnostics doc
101
+
102
+ let change = TextDocumentContentChangeEvent
103
+ (Just (Range (Position 1 8 ) (Position 1 12 )))
104
+ Nothing " x"
105
+ changeDoc doc [change]
106
+ expectNoMoreDiagnostics 3 doc " hlint"
107
+
108
+ let change' = TextDocumentContentChangeEvent
109
+ (Just (Range (Position 1 8 ) (Position 1 12 )))
110
+ Nothing " id x"
111
+ changeDoc doc [change']
112
+ testHlintDiagnostics doc
113
+
98
114
, knownBrokenForGhcVersions [GHC88 , GHC86 ] " hlint doesn't take in account cpp flag as ghc -D argument" $
99
115
testCase " hlint diagnostics works with CPP via ghc -XCPP argument (#554)" $ runHlintSession " cpp" $ do
100
116
doc <- openDoc " ApplyRefact3.hs" " haskell"
You can’t perform that action at this time.
0 commit comments