Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindToFlags ¶
BindToFlags binds Config fields to according flags.
Types ¶
type BoolCompareConfig ¶ added in v1.2.0
type BoolCompareConfig struct {
IgnoreCustomTypes bool
}
BoolCompareConfig implements configuration of checkers.BoolCompare.
type Config ¶
type Config struct { EnableAll bool DisabledCheckers KnownCheckersValue DisableAll bool EnabledCheckers KnownCheckersValue BoolCompare BoolCompareConfig ExpectedActual ExpectedActualConfig Formatter FormatterConfig GoRequire GoRequireConfig RequireError RequireErrorConfig SuiteExtraAssertCall SuiteExtraAssertCallConfig }
Config implements testifylint configuration.
type EnumValue ¶
type EnumValue[EnumT comparable] struct { // contains filtered or unexported fields }
EnumValue is a special type for support of flag.FlagSet over user-defined constants.
func NewEnumValue ¶
func NewEnumValue[EnumT comparable](mapping map[string]EnumT, dst *EnumT) *EnumValue[EnumT]
NewEnumValue takes the "enum-value-name to enum-value" mapping and a destination for the value passed through the CLI. Returns an EnumValue instance suitable for flag.FlagSet.Var.
type ExpectedActualConfig ¶
type ExpectedActualConfig struct {
ExpVarPattern RegexpValue
}
ExpectedActualConfig implements configuration of checkers.ExpectedActual.
type FormatterConfig ¶ added in v1.4.0
FormatterConfig implements configuration of checkers.Formatter.
type GoRequireConfig ¶ added in v1.3.0
type GoRequireConfig struct {
IgnoreHTTPHandlers bool
}
GoRequireConfig implements configuration of checkers.GoRequire.
type KnownCheckersValue ¶
type KnownCheckersValue []string
KnownCheckersValue implements comma separated list of testify checkers.
func (KnownCheckersValue) Contains ¶ added in v1.0.0
func (kcv KnownCheckersValue) Contains(v string) bool
func (*KnownCheckersValue) Set ¶
func (kcv *KnownCheckersValue) Set(v string) error
func (KnownCheckersValue) String ¶
func (kcv KnownCheckersValue) String() string
type RegexpValue ¶
RegexpValue is a special wrapper for support of flag.FlagSet over regexp.Regexp. Original regexp is available through RegexpValue.Regexp.
func (*RegexpValue) Set ¶
func (rv *RegexpValue) Set(v string) error
func (RegexpValue) String ¶
func (rv RegexpValue) String() string
type RequireErrorConfig ¶ added in v1.0.0
type RequireErrorConfig struct {
FnPattern RegexpValue
}
RequireErrorConfig implements configuration of checkers.RequireError.
type SuiteExtraAssertCallConfig ¶
type SuiteExtraAssertCallConfig struct {
Mode checkers.SuiteExtraAssertCallMode
}
SuiteExtraAssertCallConfig implements configuration of checkers.SuiteExtraAssertCall.