Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BDDKeywords = map[string]struct{}{
"given": {},
"when": {},
"then": {},
"arrange": {},
"act": {},
"assert": {},
"when & then": {},
"when&then": {},
}
BDDKeywords contains BDD-style comment keywords that should be skipped.
var TypeCheckerPrefixes = []string{
"type:",
"noqa",
"pyright:",
"ruff:",
"mypy:",
"pylint:",
"flake8:",
"pyre:",
"pytype:",
"eslint-disable",
"eslint-ignore",
"prettier-ignore",
"ts-ignore",
"ts-expect-error",
"clippy:",
"allow",
"deny",
"warn",
"forbid",
}
TypeCheckerPrefixes contains type checker and linter directive prefixes that should be skipped.
Functions ¶
This section is empty.
Types ¶
type BDDFilter ¶
type BDDFilter struct{}
BDDFilter filters BDD-style comments.
func (*BDDFilter) ShouldSkip ¶
func (f *BDDFilter) ShouldSkip(comment models.CommentInfo) bool
ShouldSkip returns true if the comment is a BDD keyword.
type DirectiveFilter ¶
type DirectiveFilter struct{}
DirectiveFilter filters type checker and linter directives.
func NewDirectiveFilter ¶
func NewDirectiveFilter() *DirectiveFilter
NewDirectiveFilter creates a new DirectiveFilter.
func (*DirectiveFilter) ShouldSkip ¶
func (f *DirectiveFilter) ShouldSkip(comment models.CommentInfo) bool
ShouldSkip returns true if the comment is a directive.
type DocstringFilter ¶
type DocstringFilter struct{}
DocstringFilter filters docstrings (Python, JSDoc, Javadoc).
func NewDocstringFilter ¶
func NewDocstringFilter() *DocstringFilter
NewDocstringFilter creates a new DocstringFilter.
func (*DocstringFilter) ShouldSkip ¶
func (f *DocstringFilter) ShouldSkip(comment models.CommentInfo) bool
ShouldSkip returns true if the comment is a docstring.
type ShebangFilter ¶
type ShebangFilter struct{}
ShebangFilter filters shebang lines.
func NewShebangFilter ¶
func NewShebangFilter() *ShebangFilter
NewShebangFilter creates a new ShebangFilter.
func (*ShebangFilter) ShouldSkip ¶
func (f *ShebangFilter) ShouldSkip(comment models.CommentInfo) bool
ShouldSkip returns true if the comment is a shebang.