Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TypePatternDefaultSpec ¶
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) 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) 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) Spec ¶
func (r *NoLayerSuffix) Spec() core.RuleSpec
type NoStutter ¶
type NoStutter struct {
// contains filtered or unexported fields
}
func NewNoStutter ¶
type Option ¶
type Option func(*ruleConfig)
func WithAllowedConstructorNames ¶
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 ¶
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 ¶
type SnakeCaseFiles ¶
type SnakeCaseFiles struct {
// contains filtered or unexported fields
}
func NewSnakeCaseFiles ¶
func NewSnakeCaseFiles(opts ...Option) *SnakeCaseFiles
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) Spec ¶
func (r *TypePattern) Spec() core.RuleSpec