1
1
---------------------------------------------------------------------
2
- RUN tests/empty-comment.hs
3
- FILE tests/empty-comment.hs
2
+ RUN tests/empty-comment-single .hs
3
+ FILE tests/empty-comment-single .hs
4
4
5
5
-- |
6
6
haddockAboveSingle = 1
7
7
8
8
haddockBelowSingle = 1
9
9
-- ^
10
10
11
+ OUTPUT
12
+ tests/empty-comment-single.hs:2:1-4: Suggestion: Empty single-line haddock
13
+ Found:
14
+ -- |
15
+ Perhaps you should remove it.
16
+
17
+ tests/empty-comment-single.hs:6:1-4: Suggestion: Empty single-line haddock
18
+ Found:
19
+ -- ^
20
+ Perhaps you should remove it.
21
+
22
+ 2 hints
23
+
24
+ ---------------------------------------------------------------------
25
+ RUN tests/empty-comment-singles.hs
26
+ FILE tests/empty-comment-singles.hs
27
+
11
28
-- |
12
29
--
13
30
haddockAboveSingles = 1
@@ -16,17 +33,23 @@ haddockAboveSingles = 1
16
33
-- >>>
17
34
haddockAboveDoctest = 1
18
35
19
- -- |
20
- --
21
- --
22
- -- foo
23
- haddockAboveIntoNonEmpty = 1
36
+ OUTPUT
37
+ tests/empty-comment-singles.hs:2:1-4: Suggestion: Empty single-line haddock
38
+ Found:
39
+ -- |
40
+ Perhaps you should remove it.
24
41
25
- haddockBelowIntoNonEmpty = 1
26
- -- ^
27
- --
28
- --
29
- -- foo
42
+ tests/empty-comment-singles.hs:3:1-2: Suggestion: Empty single-line comment
43
+ Found:
44
+ --
45
+ Perhaps you should remove it.
46
+
47
+ 2 hints
48
+
49
+
50
+ ---------------------------------------------------------------------
51
+ RUN tests/empty-comment-multi.hs
52
+ FILE tests/empty-comment-multi.hs
30
53
31
54
{--}
32
55
commentMultiEmpty = 1
@@ -61,122 +84,128 @@ haddockBelowMultiEmptyLines = 1
61
84
62
85
-}
63
86
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
87
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
88
+ tests/empty-comment-multi.hs:2:1-4: Suggestion: Empty multi-line comment
102
89
Found:
103
90
{--}
104
91
Perhaps you should remove it.
105
92
106
- tests/empty-comment.hs:31 :1-5: Suggestion: Empty multi-line comment
93
+ tests/empty-comment-multi .hs:5 :1-5: Suggestion: Empty multi-line comment
107
94
Found:
108
95
{- -}
109
96
Perhaps you should remove it.
110
97
111
- tests/empty-comment.hs:(34 ,1)-(36 ,6): Suggestion: Empty multi-line comment
98
+ tests/empty-comment-multi .hs:(8 ,1)-(10 ,6): Suggestion: Empty multi-line comment
112
99
Found:
113
100
{-
114
101
115
102
-}
116
103
Perhaps you should remove it.
117
104
118
- tests/empty-comment.hs:39 :1-6: Suggestion: Empty multi-line haddock
105
+ tests/empty-comment-multi .hs:13 :1-6: Suggestion: Empty multi-line haddock
119
106
Found:
120
107
{- |-}
121
108
Perhaps you should remove it.
122
109
123
- tests/empty-comment.hs:42 :1-7: Suggestion: Empty multi-line haddock
110
+ tests/empty-comment-multi .hs:16 :1-7: Suggestion: Empty multi-line haddock
124
111
Found:
125
112
{- | -}
126
113
Perhaps you should remove it.
127
114
128
- tests/empty-comment.hs:(45 ,1)-(47 ,6): Suggestion: Empty multi-line haddock
115
+ tests/empty-comment-multi .hs:(19 ,1)-(21 ,6): Suggestion: Empty multi-line haddock
129
116
Found:
130
117
{- |
131
118
132
119
-}
133
120
Perhaps you should remove it.
134
121
135
- tests/empty-comment.hs:51 :1-6: Suggestion: Empty multi-line haddock
122
+ tests/empty-comment-multi .hs:25 :1-6: Suggestion: Empty multi-line haddock
136
123
Found:
137
124
{- ^-}
138
125
Perhaps you should remove it.
139
126
140
- tests/empty-comment.hs:54 :1-6: Suggestion: Empty multi-line haddock
127
+ tests/empty-comment-multi .hs:28 :1-6: Suggestion: Empty multi-line haddock
141
128
Found:
142
129
{- ^-}
143
130
Perhaps you should remove it.
144
131
145
- tests/empty-comment.hs:(57 ,1)-(59 ,6): Suggestion: Empty multi-line haddock
132
+ tests/empty-comment-multi .hs:(31 ,1)-(33 ,6): Suggestion: Empty multi-line haddock
146
133
Found:
147
134
{- ^
148
135
149
136
-}
150
137
Perhaps you should remove it.
151
138
152
- tests/empty-comment.hs:63:3-6: Suggestion: Empty single-line haddock
139
+ 9 hints
140
+
141
+ ---------------------------------------------------------------------
142
+ RUN tests/empty-comment-nonempty.hs
143
+ FILE tests/empty-comment-nonempty.hs
144
+
145
+ -- |
146
+ --
147
+ --
148
+ -- foo
149
+ haddockAboveIntoNonEmpty = 1
150
+
151
+ haddockBelowIntoNonEmpty = 1
152
+ -- ^
153
+ --
154
+ --
155
+ -- foo
156
+
157
+ OUTPUT
158
+ No hints
159
+
160
+ ---------------------------------------------------------------------
161
+ RUN tests/empty-comment-record.hs
162
+ FILE tests/empty-comment-record.hs
163
+
164
+ data HaddockSingle = HaddockSingle
165
+ { haddockFieldEmptyBelow :: Int
166
+ -- ^
167
+ -- |
168
+ , haddockFieldAboveEmpty :: Int
169
+ , haddockFieldEmptyAfter :: Int -- ^
170
+ }
171
+
172
+ data HaddockMulti = HaddockMulti
173
+ { haddockFieldEmptyBelow :: Int
174
+ {- ^-}
175
+ {- |-}
176
+ , haddockFieldAboveEmpty :: Int
177
+ , haddockFieldEmptyAfter :: Int {- ^-}
178
+ }
179
+
180
+ OUTPUT
181
+ tests/empty-comment-record.hs:4:3-6: Suggestion: Empty single-line haddock
153
182
Found:
154
183
-- ^
155
184
Perhaps you should remove it.
156
185
157
- tests/empty-comment.hs:64 :3-6: Suggestion: Empty single-line haddock
186
+ tests/empty-comment-record .hs:5 :3-6: Suggestion: Empty single-line haddock
158
187
Found:
159
188
-- |
160
189
Perhaps you should remove it.
161
190
162
- tests/empty-comment.hs:66 :35-38: Suggestion: Empty single-line haddock
191
+ tests/empty-comment-record .hs:7 :35-38: Suggestion: Empty single-line haddock
163
192
Found:
164
193
-- ^
165
194
Perhaps you should remove it.
166
195
167
- tests/empty-comment.hs:71 :3-8: Suggestion: Empty multi-line haddock
196
+ tests/empty-comment-record .hs:12 :3-8: Suggestion: Empty multi-line haddock
168
197
Found:
169
198
{- ^-}
170
199
Perhaps you should remove it.
171
200
172
- tests/empty-comment.hs:72 :3-8: Suggestion: Empty multi-line haddock
201
+ tests/empty-comment-record .hs:13 :3-8: Suggestion: Empty multi-line haddock
173
202
Found:
174
203
{- |-}
175
204
Perhaps you should remove it.
176
205
177
- tests/empty-comment.hs:74 :35-40: Suggestion: Empty multi-line haddock
206
+ tests/empty-comment-record .hs:15 :35-40: Suggestion: Empty multi-line haddock
178
207
Found:
179
208
{- ^-}
180
209
Perhaps you should remove it.
181
210
182
- 19 hints
211
+ 6 hints
0 commit comments