naming

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TypePatternDefaultSpec

func TypePatternDefaultSpec() core.RuleSpec

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

Types

type ConstructorName

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

func NewConstructorName

func NewConstructorName(opts ...Option) *ConstructorName

func (*ConstructorName) Check

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

func (*ConstructorName) Spec

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

type ImplSuffix

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

func NewImplSuffix

func NewImplSuffix(opts ...Option) *ImplSuffix

func (*ImplSuffix) Check

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

func (*ImplSuffix) Spec

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

type NoLayerSuffix

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

func NewNoLayerSuffix

func NewNoLayerSuffix(opts ...Option) *NoLayerSuffix

func (*NoLayerSuffix) Check

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

func (*NoLayerSuffix) Spec

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

type NoStutter

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

func NewNoStutter

func NewNoStutter(opts ...Option) *NoStutter

func (*NoStutter) Check

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

func (*NoStutter) Spec

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

type Option

type Option func(*ruleConfig)

func WithAllowedConstructorNames

func WithAllowedConstructorNames(names ...string) Option

WithAllowedConstructorNames sets the package-level constructor names that infra.constructor-name accepts. Blank names are ignored. If all provided names are blank, the rule falls back to "New".

func WithInfraSublayers

func WithInfraSublayers(sublayers ...string) Option

WithInfraSublayers sets the sublayers checked by infra.constructor-name. Values are architecture sublayer paths such as "infra", "adapter", or "persistence". Blank names are ignored. If omitted, the rule infers common infra-like sublayers from the configured architecture and falls back to "infra".

func WithSeverity

func WithSeverity(severity core.Severity) Option

type SnakeCaseFiles

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

func NewSnakeCaseFiles

func NewSnakeCaseFiles(opts ...Option) *SnakeCaseFiles

func (*SnakeCaseFiles) Check

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

func (*SnakeCaseFiles) Spec

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

type TypePattern

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

func NewTypePattern

func NewTypePattern(opts ...Option) *TypePattern

func (*TypePattern) Check

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

func (*TypePattern) Spec

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

Jump to

Keyboard shortcuts

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