MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / recognizes_go_directives

Function recognizes_go_directives

codegraph-kernel/src/docstring.rs:384–391  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected