File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 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" [
155155 testCase " hlint diagnostics ignore hints honouring HLINT annotations" $ runHlintSession " " $ do
156156 doc <- openDoc " ApplyRefact5.hs" " haskell"
157157 expectNoMoreDiagnostics 3 doc " hlint"
158+
159+ , testCase " apply-refact preserve regular comments" $ runHlintSession " " $ do
160+ testRefactor " ApplyRefact6.hs" " Redundant bracket" expectedComments
158161 ]
159162 where
160163 runHlintSession :: FilePath -> Session a -> IO a
@@ -193,6 +196,14 @@ hlintTests = testGroup "hlint suggestions" [
193196 , " g = 2"
194197 , " #endif" , " "
195198 ]
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+ ]
196207
197208renameTests :: TestTree
198209renameTests = testGroup " rename suggestions" [
Original file line number Diff line number Diff line change 88 - " ApplyRefact3"
99 - " ApplyRefact4"
1010 - " ApplyRefact5"
11+ - " ApplyRefact6"
You can’t perform that action at this time.
0 commit comments