filters

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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 AgentMemoFilter added in v0.6.0

type AgentMemoFilter struct{}

func NewAgentMemoFilter added in v0.6.0

func NewAgentMemoFilter() *AgentMemoFilter

func (*AgentMemoFilter) IsAgentMemo added in v0.6.0

func (f *AgentMemoFilter) IsAgentMemo(comment models.CommentInfo) bool

type BDDFilter

type BDDFilter struct{}

BDDFilter filters BDD-style comments.

func NewBDDFilter

func NewBDDFilter() *BDDFilter

NewBDDFilter creates a new BDDFilter.

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 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL