()
| 382 | /// the near misses it keeps. |
| 383 | #[test] |
| 384 | fn recognizes_go_directives() { |
| 385 | for directive in ["//go:embed x", "//nolint:errcheck", "//a1:b", "//line f.go:1", "//extern f", "//export F"] { |
| 386 | assert!(is_directive(directive), "{directive}"); |
| 387 | } |
| 388 | for comment in ["// nolint:errcheck", "//TODO: x", "//https://go.dev", "//go:", "//:x", "//line", "/*go:embed x*/", "//go-x:y"] { |
| 389 | assert!(!is_directive(comment), "{comment}"); |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | /// Skipping directives leaves them out of the docstring's text but not |
| 394 | /// out of the comment run: one beside a doc comment drops out of it, and a |
nothing calls this directly
no outgoing calls
no test coverage detected