types

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoSetterDefaultSpec

func NoSetterDefaultSpec() core.RuleSpec

NoSetterDefaultSpec returns a fresh copy of the rule's static metadata (with the hard-coded default severity, before any construction-time override). The returned value is independent — mutating it has no effect on subsequent calls. Tooling (--list-rules, doc generators, plugin catalogs) should call this rather than reading a package-level variable.

Types

type NoPanicInDomain

type NoPanicInDomain struct {
	// contains filtered or unexported fields
}

func NewNoPanicInDomain

func NewNoPanicInDomain(opts ...Option) *NoPanicInDomain

func (*NoPanicInDomain) Check

func (r *NoPanicInDomain) Check(ctx *core.Context) []core.Violation

func (*NoPanicInDomain) Spec

func (r *NoPanicInDomain) Spec() core.RuleSpec

type NoSetter

type NoSetter struct {
	// contains filtered or unexported fields
}

func NewNoSetter

func NewNoSetter(opts ...Option) *NoSetter

func (*NoSetter) Check

func (r *NoSetter) Check(ctx *core.Context) []core.Violation

func (*NoSetter) Spec

func (r *NoSetter) Spec() core.RuleSpec

type Option

type Option func(*ruleConfig)

func WithAllowedFunctions

func WithAllowedFunctions(names ...string) Option

WithAllowedFunctions exempts function names. Patterns may end in "*" to allow families such as Must* helpers.

func WithAllowedPaths

func WithAllowedPaths(paths ...string) Option

WithAllowedPaths exempts project-relative file or subtree patterns. Patterns may end in "/..." to match a directory and all descendants.

func WithInspectedLayers

func WithInspectedLayers(layers ...string) Option

WithInspectedLayers sets the architecture sublayers checked by this rule. Examples include "core/model", "core/svc", "event", "app", "entity", "usecase", "domain", "core", and "application". Blank names are ignored.

func WithSeverity

func WithSeverity(severity core.Severity) Option

Jump to

Keyboard shortcuts

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