Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func NewContainer ¶
type CrossDomainAnonymous ¶
type CrossDomainAnonymous struct {
// contains filtered or unexported fields
}
func NewCrossDomainAnonymous ¶
func NewCrossDomainAnonymous(opts ...Option) *CrossDomainAnonymous
func (*CrossDomainAnonymous) Check ¶
func (r *CrossDomainAnonymous) Check(ctx *core.Context) []core.Violation
func (*CrossDomainAnonymous) Spec ¶
func (r *CrossDomainAnonymous) Spec() core.RuleSpec
type Option ¶
type Option func(*ruleConfig)
func WithMaxMethods ¶
WithMaxMethods sets the per-interface method count cap. It applies only to interfaces.NewTooManyMethods — passing it to other interfaces.New*() rules (NewPattern, NewContainer, NewCrossDomainAnonymous) is silently ignored to keep the option API uniform across the package.
Values <= 0 are treated as "use the default" (currently 10).
func WithSeverity ¶
type TooManyMethods ¶
type TooManyMethods struct {
// contains filtered or unexported fields
}
TooManyMethods flags interfaces whose method count exceeds the configured cap (default 10). Override the cap with interfaces.WithMaxMethods(n).
Scope mirrors interfaces.Pattern: the rule iterates every loaded package, applies the same Architecture-driven exclusion (isExcludedInterfacePatternPkg), and only inspects exported interfaces declared in those packages.
func NewTooManyMethods ¶
func NewTooManyMethods(opts ...Option) *TooManyMethods
func (*TooManyMethods) Spec ¶
func (r *TooManyMethods) Spec() core.RuleSpec