QueryComments checks if there has been an in-text comment for this check.
(check string)
| 383 | |
| 384 | // QueryComments checks if there has been an in-text comment for this check. |
| 385 | func (f *File) QueryComments(check string) bool { |
| 386 | if f.Comments["off"] { |
| 387 | return true |
| 388 | } |
| 389 | if style, _, ok := strings.Cut(check, "."); ok { |
| 390 | if status := f.Comments[style]; status { |
| 391 | return true |
| 392 | } |
| 393 | } |
| 394 | if status := f.Comments[check]; status { |
| 395 | return true |
| 396 | } |
| 397 | return false |
| 398 | } |
| 399 | |
| 400 | // ResetComments resets the state of all checks back to active. |
| 401 | func (f *File) ResetComments() { |