File tree 2 files changed +12
-0
lines changed 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,9 @@ hlintTests = testGroup "hlint suggestions" [
155
155
testCase " hlint diagnostics ignore hints honouring HLINT annotations" $ runHlintSession " " $ do
156
156
doc <- openDoc " ApplyRefact5.hs" " haskell"
157
157
expectNoMoreDiagnostics 3 doc " hlint"
158
+
159
+ , testCase " apply-refact preserve regular comments" $ runHlintSession " " $ do
160
+ testRefactor " ApplyRefact6.hs" " Redundant bracket" expectedComments
158
161
]
159
162
where
160
163
runHlintSession :: FilePath -> Session a -> IO a
@@ -193,6 +196,14 @@ hlintTests = testGroup "hlint suggestions" [
193
196
, " g = 2"
194
197
, " #endif" , " "
195
198
]
199
+ expectedComments = [ " -- comment before header"
200
+ , " module ApplyRefact6 where" , " "
201
+ , " {-# standalone annotation #-}" , " "
202
+ , " -- standalone comment" , " "
203
+ , " -- | haddock comment"
204
+ , " f = {- inline comment -} 1 -- ending comment" , " "
205
+ , " -- final comment"
206
+ ]
196
207
197
208
renameTests :: TestTree
198
209
renameTests = testGroup " rename suggestions" [
Original file line number Diff line number Diff line change 8
8
- " ApplyRefact3"
9
9
- " ApplyRefact4"
10
10
- " ApplyRefact5"
11
+ - " ApplyRefact6"
You can’t perform that action at this time.
0 commit comments