Skip to content

Commit d1dbaef

Browse files
committed
Convert .hs into a .test
1 parent 1664131 commit d1dbaef

File tree

2 files changed

+182
-74
lines changed

2 files changed

+182
-74
lines changed

tests/empty-comment-test.hs

-74
This file was deleted.

tests/empty-comment.test

+182
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
---------------------------------------------------------------------
2+
RUN tests/empty-comment.hs
3+
FILE tests/empty-comment.hs
4+
5+
-- |
6+
haddockAboveSingle = 1
7+
8+
haddockBelowSingle = 1
9+
-- ^
10+
11+
-- |
12+
--
13+
haddockAboveSingles = 1
14+
15+
-- |
16+
-- >>>
17+
haddockAboveDoctest = 1
18+
19+
-- |
20+
--
21+
--
22+
-- foo
23+
haddockAboveIntoNonEmpty = 1
24+
25+
haddockBelowIntoNonEmpty = 1
26+
-- ^
27+
--
28+
--
29+
-- foo
30+
31+
{--}
32+
commentMultiEmpty = 1
33+
34+
{- -}
35+
commentMultiEmptySpace = 1
36+
37+
{-
38+
39+
-}
40+
commentMultiEmptyLines = 1
41+
42+
{- |-}
43+
haddockAboveMultiEmpty = 1
44+
45+
{- | -}
46+
haddockAboveMultiEmptySpace = 1
47+
48+
{- |
49+
50+
-}
51+
haddockAboveMultiEmptyLines = 1
52+
53+
haddockBelowMultiEmpty = 1
54+
{- ^-}
55+
56+
haddockBelowMultiEmptySpace = 1
57+
{- ^-}
58+
59+
haddockBelowMultiEmptyLines = 1
60+
{- ^
61+
62+
-}
63+
64+
data HaddockSingle = HaddockSingle
65+
{ haddockFieldEmptyBelow :: Int
66+
-- ^
67+
-- |
68+
, haddockFieldAboveEmpty :: Int
69+
, haddockFieldEmptyAfter :: Int -- ^
70+
}
71+
72+
data HaddockMulti = HaddockMulti
73+
{ haddockFieldEmptyBelow :: Int
74+
{- ^-}
75+
{- |-}
76+
, haddockFieldAboveEmpty :: Int
77+
, haddockFieldEmptyAfter :: Int {- ^-}
78+
}
79+
80+
OUTPUT
81+
tests/empty-comment.hs:2:1-4: Suggestion: Empty single-line haddock
82+
Found:
83+
-- |
84+
Perhaps you should remove it.
85+
86+
tests/empty-comment.hs:6:1-4: Suggestion: Empty single-line haddock
87+
Found:
88+
-- ^
89+
Perhaps you should remove it.
90+
91+
tests/empty-comment.hs:8:1-4: Suggestion: Empty single-line haddock
92+
Found:
93+
-- |
94+
Perhaps you should remove it.
95+
96+
tests/empty-comment.hs:9:1-2: Suggestion: Empty single-line comment
97+
Found:
98+
--
99+
Perhaps you should remove it.
100+
101+
tests/empty-comment.hs:28:1-4: Suggestion: Empty multi-line comment
102+
Found:
103+
{--}
104+
Perhaps you should remove it.
105+
106+
tests/empty-comment.hs:31:1-5: Suggestion: Empty multi-line comment
107+
Found:
108+
{- -}
109+
Perhaps you should remove it.
110+
111+
tests/empty-comment.hs:(34,1)-(36,6): Suggestion: Empty multi-line comment
112+
Found:
113+
{-
114+
115+
-}
116+
Perhaps you should remove it.
117+
118+
tests/empty-comment.hs:39:1-6: Suggestion: Empty multi-line haddock
119+
Found:
120+
{- |-}
121+
Perhaps you should remove it.
122+
123+
tests/empty-comment.hs:42:1-7: Suggestion: Empty multi-line haddock
124+
Found:
125+
{- | -}
126+
Perhaps you should remove it.
127+
128+
tests/empty-comment.hs:(45,1)-(47,6): Suggestion: Empty multi-line haddock
129+
Found:
130+
{- |
131+
132+
-}
133+
Perhaps you should remove it.
134+
135+
tests/empty-comment.hs:51:1-6: Suggestion: Empty multi-line haddock
136+
Found:
137+
{- ^-}
138+
Perhaps you should remove it.
139+
140+
tests/empty-comment.hs:54:1-6: Suggestion: Empty multi-line haddock
141+
Found:
142+
{- ^-}
143+
Perhaps you should remove it.
144+
145+
tests/empty-comment.hs:(57,1)-(59,6): Suggestion: Empty multi-line haddock
146+
Found:
147+
{- ^
148+
149+
-}
150+
Perhaps you should remove it.
151+
152+
tests/empty-comment.hs:63:3-6: Suggestion: Empty single-line haddock
153+
Found:
154+
-- ^
155+
Perhaps you should remove it.
156+
157+
tests/empty-comment.hs:64:3-6: Suggestion: Empty single-line haddock
158+
Found:
159+
-- |
160+
Perhaps you should remove it.
161+
162+
tests/empty-comment.hs:66:35-38: Suggestion: Empty single-line haddock
163+
Found:
164+
-- ^
165+
Perhaps you should remove it.
166+
167+
tests/empty-comment.hs:71:3-8: Suggestion: Empty multi-line haddock
168+
Found:
169+
{- ^-}
170+
Perhaps you should remove it.
171+
172+
tests/empty-comment.hs:72:3-8: Suggestion: Empty multi-line haddock
173+
Found:
174+
{- |-}
175+
Perhaps you should remove it.
176+
177+
tests/empty-comment.hs:74:35-40: Suggestion: Empty multi-line haddock
178+
Found:
179+
{- ^-}
180+
Perhaps you should remove it.
181+
182+
19 hints

0 commit comments

Comments
 (0)