You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: internal/reporter/comments_test.go
+37-2Lines changed: 37 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -159,6 +159,41 @@ bar warning
159
159
meta: nil,
160
160
}
161
161
162
+
infoReport:=Report{
163
+
Path: discovery.Path{
164
+
SymlinkTarget: "info.txt",
165
+
Name: "info.txt",
166
+
},
167
+
Changes: discovery.Changes{
168
+
OldPath: "",
169
+
Lines: git.LineNumbers{{Before: 0, After: 1}},
170
+
},
171
+
Rule: mockFile.Groups[0].Rules[0],
172
+
Problem: checks.Problem{
173
+
Reporter: "info",
174
+
Summary: "info note",
175
+
Details: "",
176
+
Lines: diags.LineRange{First: 1, Last: 1},
177
+
Severity: checks.Information,
178
+
Anchor: checks.AnchorAfter,
179
+
},
180
+
}
181
+
infoComment:=ExistingComment{
182
+
path: "info.txt",
183
+
line: 1,
184
+
text: `:information_source: **Information** reported by [pint](https://cloudflare.github.io/pint/) **info** check.
185
+
186
+
------
187
+
188
+
info note
189
+
190
+
------
191
+
192
+
:information_source: To see documentation covering this check and instructions on how to resolve it [click here](https://cloudflare.github.io/pint/checks/info.html).
193
+
`,
194
+
meta: nil,
195
+
}
196
+
162
197
typetestCaseTstruct {
163
198
commenterCommenter
164
199
checkErrfunc(t*testing.T, errerror)
@@ -203,7 +238,7 @@ bar warning
203
238
},
204
239
{
205
240
description: "no-op when all comments already exist",
0 commit comments