rule

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 18 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddConstantRule

type AddConstantRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

AddConstantRule lints unused params in functions.

func (*AddConstantRule) Apply

func (r *AddConstantRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*AddConstantRule) Name

func (*AddConstantRule) Name() string

Name returns the rule name.

type ArgumentsLimitRule

type ArgumentsLimitRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ArgumentsLimitRule lints given else constructs.

func (*ArgumentsLimitRule) Apply

func (r *ArgumentsLimitRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ArgumentsLimitRule) Name

func (*ArgumentsLimitRule) Name() string

Name returns the rule name.

type AtomicRule

type AtomicRule struct{}

AtomicRule lints given else constructs.

func (*AtomicRule) Apply

func (*AtomicRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*AtomicRule) Name

func (*AtomicRule) Name() string

Name returns the rule name.

type BannedCharsRule added in v1.1.3

type BannedCharsRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

BannedCharsRule checks if a file contains banned characters.

func (*BannedCharsRule) Apply added in v1.1.3

func (r *BannedCharsRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applied the rule to the given file.

func (*BannedCharsRule) Name added in v1.1.3

func (*BannedCharsRule) Name() string

Name returns the rule name

type BareReturnRule

type BareReturnRule struct{}

BareReturnRule lints given else constructs.

func (*BareReturnRule) Apply

func (*BareReturnRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*BareReturnRule) Name

func (*BareReturnRule) Name() string

Name returns the rule name.

type BlankImportsRule

type BlankImportsRule struct{}

BlankImportsRule lints given else constructs.

func (*BlankImportsRule) Apply

func (r *BlankImportsRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*BlankImportsRule) Name

func (*BlankImportsRule) Name() string

Name returns the rule name.

type BoolLiteralRule

type BoolLiteralRule struct{}

BoolLiteralRule warns when logic expressions contains Boolean literals.

func (*BoolLiteralRule) Apply

func (*BoolLiteralRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*BoolLiteralRule) Name

func (*BoolLiteralRule) Name() string

Name returns the rule name.

type CallToGCRule

type CallToGCRule struct{}

CallToGCRule lints calls to the garbage collector.

func (*CallToGCRule) Apply

func (*CallToGCRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*CallToGCRule) Name

func (*CallToGCRule) Name() string

Name returns the rule name.

type CognitiveComplexityRule

type CognitiveComplexityRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

CognitiveComplexityRule lints given else constructs.

func (*CognitiveComplexityRule) Apply

func (r *CognitiveComplexityRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*CognitiveComplexityRule) Name

Name returns the rule name.

type CommentSpacingsRule added in v1.2.5

type CommentSpacingsRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

CommentSpacings Rule check the whether there is a space between the comment symbol( // ) and the start of the comment text

func (*CommentSpacingsRule) Apply added in v1.2.5

func (r *CommentSpacingsRule) Apply(file *lint.File, args lint.Arguments) []lint.Failure

func (*CommentSpacingsRule) Name added in v1.2.5

func (*CommentSpacingsRule) Name() string

type ConfusingNamingRule

type ConfusingNamingRule struct{}

ConfusingNamingRule lints method names that differ only by capitalization

func (*ConfusingNamingRule) Apply

func (*ConfusingNamingRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ConfusingNamingRule) Name

func (*ConfusingNamingRule) Name() string

Name returns the rule name.

type ConfusingResultsRule

type ConfusingResultsRule struct{}

ConfusingResultsRule lints given function declarations

func (*ConfusingResultsRule) Apply

Apply applies the rule to given file.

func (*ConfusingResultsRule) Name

func (*ConfusingResultsRule) Name() string

Name returns the rule name.

type ConstantLogicalExprRule

type ConstantLogicalExprRule struct{}

ConstantLogicalExprRule warns on constant logical expressions.

func (*ConstantLogicalExprRule) Apply

Apply applies the rule to given file.

func (*ConstantLogicalExprRule) Name

Name returns the rule name.

type ContextAsArgumentRule

type ContextAsArgumentRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ContextAsArgumentRule lints given else constructs.

func (*ContextAsArgumentRule) Apply

func (r *ContextAsArgumentRule) Apply(file *lint.File, args lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ContextAsArgumentRule) Name

func (*ContextAsArgumentRule) Name() string

Name returns the rule name.

type ContextKeysType

type ContextKeysType struct{}

ContextKeysType lints given else constructs.

func (*ContextKeysType) Apply

func (*ContextKeysType) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ContextKeysType) Name

func (*ContextKeysType) Name() string

Name returns the rule name.

type CyclomaticRule

type CyclomaticRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

CyclomaticRule lints given else constructs.

func (*CyclomaticRule) Apply

func (r *CyclomaticRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*CyclomaticRule) Name

func (*CyclomaticRule) Name() string

Name returns the rule name.

type DataRaceRule added in v1.2.2

type DataRaceRule struct{}

DataRaceRule lints assignments to value method-receivers.

func (*DataRaceRule) Apply added in v1.2.2

func (*DataRaceRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*DataRaceRule) Name added in v1.2.2

func (*DataRaceRule) Name() string

Name returns the rule name.

type DeepExitRule

type DeepExitRule struct{}

DeepExitRule lints program exit at functions other than main or init.

func (*DeepExitRule) Apply

func (*DeepExitRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*DeepExitRule) Name

func (*DeepExitRule) Name() string

Name returns the rule name.

type DeferRule added in v1.0.3

type DeferRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

DeferRule lints unused params in functions.

func (*DeferRule) Apply added in v1.0.3

func (r *DeferRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*DeferRule) Name added in v1.0.3

func (*DeferRule) Name() string

Name returns the rule name.

type DotImportsRule

type DotImportsRule struct{}

DotImportsRule lints given else constructs.

func (*DotImportsRule) Apply

func (*DotImportsRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*DotImportsRule) Name

func (*DotImportsRule) Name() string

Name returns the rule name.

type DuplicatedImportsRule

type DuplicatedImportsRule struct{}

DuplicatedImportsRule lints given else constructs.

func (*DuplicatedImportsRule) Apply

Apply applies the rule to given file.

func (*DuplicatedImportsRule) Name

func (*DuplicatedImportsRule) Name() string

Name returns the rule name.

type EarlyReturnRule added in v1.0.3

type EarlyReturnRule struct{}

EarlyReturnRule finds opportunities to reduce nesting by inverting the condition of an "if" block.

func (*EarlyReturnRule) Apply added in v1.0.3

func (*EarlyReturnRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*EarlyReturnRule) Name added in v1.0.3

func (*EarlyReturnRule) Name() string

Name returns the rule name.

type EmptyBlockRule

type EmptyBlockRule struct{}

EmptyBlockRule lints given else constructs.

func (*EmptyBlockRule) Apply

func (*EmptyBlockRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*EmptyBlockRule) Name

func (*EmptyBlockRule) Name() string

Name returns the rule name.

type EmptyLinesRule

type EmptyLinesRule struct{}

EmptyLinesRule lints empty lines in blocks.

func (*EmptyLinesRule) Apply

func (r *EmptyLinesRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*EmptyLinesRule) Name

func (*EmptyLinesRule) Name() string

Name returns the rule name.

type ErrorNamingRule

type ErrorNamingRule struct{}

ErrorNamingRule lints given else constructs.

func (*ErrorNamingRule) Apply

func (*ErrorNamingRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ErrorNamingRule) Name

func (*ErrorNamingRule) Name() string

Name returns the rule name.

type ErrorReturnRule

type ErrorReturnRule struct{}

ErrorReturnRule lints given else constructs.

func (*ErrorReturnRule) Apply

func (*ErrorReturnRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ErrorReturnRule) Name

func (*ErrorReturnRule) Name() string

Name returns the rule name.

type ErrorStringsRule

type ErrorStringsRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ErrorStringsRule lints given else constructs.

func (*ErrorStringsRule) Apply

func (r *ErrorStringsRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ErrorStringsRule) Name

func (*ErrorStringsRule) Name() string

Name returns the rule name.

type ErrorfRule

type ErrorfRule struct{}

ErrorfRule lints given else constructs.

func (*ErrorfRule) Apply

func (*ErrorfRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ErrorfRule) Name

func (*ErrorfRule) Name() string

Name returns the rule name.

type ExportedRule

type ExportedRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ExportedRule lints given else constructs.

func (*ExportedRule) Apply

func (r *ExportedRule) Apply(file *lint.File, args lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ExportedRule) Name

func (*ExportedRule) Name() string

Name returns the rule name.

type FileHeaderRule

type FileHeaderRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

FileHeaderRule lints given else constructs.

func (*FileHeaderRule) Apply

func (r *FileHeaderRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*FileHeaderRule) Name

func (*FileHeaderRule) Name() string

Name returns the rule name.

type FlagParamRule

type FlagParamRule struct{}

FlagParamRule lints given else constructs.

func (*FlagParamRule) Apply

func (*FlagParamRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*FlagParamRule) Name

func (*FlagParamRule) Name() string

Name returns the rule name.

type FunctionLength added in v1.0.5

type FunctionLength struct {
	sync.Mutex
	// contains filtered or unexported fields
}

FunctionLength lint.

func (*FunctionLength) Apply added in v1.0.5

func (r *FunctionLength) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*FunctionLength) Name added in v1.0.5

func (*FunctionLength) Name() string

Name returns the rule name.

type FunctionResultsLimitRule

type FunctionResultsLimitRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

FunctionResultsLimitRule lints given else constructs.

func (*FunctionResultsLimitRule) Apply

func (r *FunctionResultsLimitRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*FunctionResultsLimitRule) Name

Name returns the rule name.

type GetReturnRule

type GetReturnRule struct{}

GetReturnRule lints given else constructs.

func (*GetReturnRule) Apply

func (*GetReturnRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*GetReturnRule) Name

func (*GetReturnRule) Name() string

Name returns the rule name.

type IdenticalBranchesRule added in v1.0.3

type IdenticalBranchesRule struct{}

IdenticalBranchesRule warns on constant logical expressions.

func (*IdenticalBranchesRule) Apply added in v1.0.3

Apply applies the rule to given file.

func (*IdenticalBranchesRule) Name added in v1.0.3

func (*IdenticalBranchesRule) Name() string

Name returns the rule name.

type IfReturnRule

type IfReturnRule struct{}

IfReturnRule lints given else constructs.

func (*IfReturnRule) Apply

func (*IfReturnRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*IfReturnRule) Name

func (*IfReturnRule) Name() string

Name returns the rule name.

type ImportShadowingRule

type ImportShadowingRule struct{}

ImportShadowingRule lints given else constructs.

func (*ImportShadowingRule) Apply

func (*ImportShadowingRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ImportShadowingRule) Name

func (*ImportShadowingRule) Name() string

Name returns the rule name.

type ImportsBlacklistRule

type ImportsBlacklistRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ImportsBlacklistRule lints given else constructs.

func (*ImportsBlacklistRule) Apply

func (r *ImportsBlacklistRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ImportsBlacklistRule) Name

func (*ImportsBlacklistRule) Name() string

Name returns the rule name.

type IncrementDecrementRule

type IncrementDecrementRule struct{}

IncrementDecrementRule lints given else constructs.

func (*IncrementDecrementRule) Apply

Apply applies the rule to given file.

func (*IncrementDecrementRule) Name

Name returns the rule name.

type IndentErrorFlowRule

type IndentErrorFlowRule struct{}

IndentErrorFlowRule lints given else constructs.

func (*IndentErrorFlowRule) Apply

func (*IndentErrorFlowRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*IndentErrorFlowRule) Name

func (*IndentErrorFlowRule) Name() string

Name returns the rule name.

type LineLengthLimitRule

type LineLengthLimitRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

LineLengthLimitRule lints given else constructs.

func (*LineLengthLimitRule) Apply

func (r *LineLengthLimitRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*LineLengthLimitRule) Name

func (*LineLengthLimitRule) Name() string

Name returns the rule name.

type MaxPublicStructsRule

type MaxPublicStructsRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

MaxPublicStructsRule lints given else constructs.

func (*MaxPublicStructsRule) Apply

func (r *MaxPublicStructsRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*MaxPublicStructsRule) Name

func (*MaxPublicStructsRule) Name() string

Name returns the rule name.

type ModifiesParamRule

type ModifiesParamRule struct{}

ModifiesParamRule lints given else constructs.

func (*ModifiesParamRule) Apply

func (*ModifiesParamRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ModifiesParamRule) Name

func (*ModifiesParamRule) Name() string

Name returns the rule name.

type ModifiesValRecRule

type ModifiesValRecRule struct{}

ModifiesValRecRule lints assignments to value method-receivers.

func (*ModifiesValRecRule) Apply

func (*ModifiesValRecRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ModifiesValRecRule) Name

func (*ModifiesValRecRule) Name() string

Name returns the rule name.

type NestedStructs added in v1.0.8

type NestedStructs struct{}

NestedStructs lints nested structs.

func (*NestedStructs) Apply added in v1.0.8

func (*NestedStructs) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*NestedStructs) Name added in v1.0.8

func (*NestedStructs) Name() string

Name returns the rule name.

type OptimizeOperandsOrderRule added in v1.1.3

type OptimizeOperandsOrderRule struct{}

OptimizeOperandsOrderRule lints given else constructs.

func (*OptimizeOperandsOrderRule) Apply added in v1.1.3

Apply applies the rule to given file.

func (*OptimizeOperandsOrderRule) Name added in v1.1.3

Name returns the rule name.

type PackageCommentsRule

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

PackageCommentsRule lints the package comments. It complains if there is no package comment, or if it is not of the right form. This has a notable false positive in that a package comment could rightfully appear in a different file of the same package, but that's not easy to fix since this linter is file-oriented.

func (*PackageCommentsRule) Apply

func (r *PackageCommentsRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*PackageCommentsRule) Name

func (*PackageCommentsRule) Name() string

Name returns the rule name.

type RangeRule

type RangeRule struct{}

RangeRule lints given else constructs.

func (*RangeRule) Apply

func (*RangeRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*RangeRule) Name

func (*RangeRule) Name() string

Name returns the rule name.

type RangeValAddress added in v1.0.2

type RangeValAddress struct{}

RangeValAddress lints

func (*RangeValAddress) Apply added in v1.0.2

func (*RangeValAddress) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*RangeValAddress) Name added in v1.0.2

func (*RangeValAddress) Name() string

Name returns the rule name.

type RangeValInClosureRule

type RangeValInClosureRule struct{}

RangeValInClosureRule lints given else constructs.

func (*RangeValInClosureRule) Apply

Apply applies the rule to given file.

func (*RangeValInClosureRule) Name

func (*RangeValInClosureRule) Name() string

Name returns the rule name.

type ReceiverNamingRule

type ReceiverNamingRule struct{}

ReceiverNamingRule lints given else constructs.

func (*ReceiverNamingRule) Apply

func (*ReceiverNamingRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*ReceiverNamingRule) Name

func (*ReceiverNamingRule) Name() string

Name returns the rule name.

type RedefinesBuiltinIDRule

type RedefinesBuiltinIDRule struct{}

RedefinesBuiltinIDRule warns when a builtin identifier is shadowed.

func (*RedefinesBuiltinIDRule) Apply

Apply applies the rule to given file.

func (*RedefinesBuiltinIDRule) Name

Name returns the rule name.

type StringFormatRule added in v1.0.7

type StringFormatRule struct{}

StringFormatRule lints strings and/or comments according to a set of regular expressions given as Arguments

func (*StringFormatRule) Apply added in v1.0.7

func (*StringFormatRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to the given file.

func (*StringFormatRule) Name added in v1.0.7

func (*StringFormatRule) Name() string

Name returns the rule name.

func (StringFormatRule) ParseArgumentsTest added in v1.0.7

func (StringFormatRule) ParseArgumentsTest(arguments lint.Arguments) *string

ParseArgumentsTest is a public wrapper around w.parseArguments used for testing. Returns the error message provided to panic, or nil if no error was encountered

type StringOfIntRule added in v1.0.2

type StringOfIntRule struct{}

StringOfIntRule warns when logic expressions contains Boolean literals.

func (*StringOfIntRule) Apply added in v1.0.2

func (*StringOfIntRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*StringOfIntRule) Name added in v1.0.2

func (*StringOfIntRule) Name() string

Name returns the rule name.

type StructTagRule

type StructTagRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

StructTagRule lints struct tags.

func (*StructTagRule) Apply

func (r *StructTagRule) Apply(file *lint.File, args lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*StructTagRule) Name

func (*StructTagRule) Name() string

Name returns the rule name.

type SuperfluousElseRule

type SuperfluousElseRule struct{}

SuperfluousElseRule lints given else constructs.

func (*SuperfluousElseRule) Apply

func (*SuperfluousElseRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*SuperfluousElseRule) Name

func (*SuperfluousElseRule) Name() string

Name returns the rule name.

type TimeEqualRule added in v1.1.3

type TimeEqualRule struct{}

TimeEqualRule shows where "==" and "!=" used for equality check time.Time

func (*TimeEqualRule) Apply added in v1.1.3

func (*TimeEqualRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*TimeEqualRule) Name added in v1.1.3

func (*TimeEqualRule) Name() string

Name returns the rule name.

type TimeNamingRule

type TimeNamingRule struct{}

TimeNamingRule lints given else constructs.

func (*TimeNamingRule) Apply

func (*TimeNamingRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*TimeNamingRule) Name

func (*TimeNamingRule) Name() string

Name returns the rule name.

type UnconditionalRecursionRule added in v1.0.3

type UnconditionalRecursionRule struct{}

UnconditionalRecursionRule lints given else constructs.

func (*UnconditionalRecursionRule) Apply added in v1.0.3

Apply applies the rule to given file.

func (*UnconditionalRecursionRule) Name added in v1.0.3

Name returns the rule name.

type UnexportedNamingRule added in v1.0.3

type UnexportedNamingRule struct{}

UnexportedNamingRule lints wrongly named unexported symbols.

func (*UnexportedNamingRule) Apply added in v1.0.3

Apply applies the rule to given file.

func (*UnexportedNamingRule) Name added in v1.0.3

func (*UnexportedNamingRule) Name() string

Name returns the rule name.

type UnexportedReturnRule

type UnexportedReturnRule struct{}

UnexportedReturnRule lints given else constructs.

func (*UnexportedReturnRule) Apply

Apply applies the rule to given file.

func (*UnexportedReturnRule) Name

func (*UnexportedReturnRule) Name() string

Name returns the rule name.

type UnhandledErrorRule

type UnhandledErrorRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

UnhandledErrorRule lints given else constructs.

func (*UnhandledErrorRule) Apply

func (r *UnhandledErrorRule) Apply(file *lint.File, args lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*UnhandledErrorRule) Name

func (*UnhandledErrorRule) Name() string

Name returns the rule name.

type UnnecessaryStmtRule

type UnnecessaryStmtRule struct{}

UnnecessaryStmtRule warns on unnecessary statements.

func (*UnnecessaryStmtRule) Apply

func (*UnnecessaryStmtRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*UnnecessaryStmtRule) Name

func (*UnnecessaryStmtRule) Name() string

Name returns the rule name.

type UnreachableCodeRule

type UnreachableCodeRule struct{}

UnreachableCodeRule lints unreachable code.

func (*UnreachableCodeRule) Apply

func (*UnreachableCodeRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*UnreachableCodeRule) Name

func (*UnreachableCodeRule) Name() string

Name returns the rule name.

type UnusedParamRule

type UnusedParamRule struct{}

UnusedParamRule lints unused params in functions.

func (*UnusedParamRule) Apply

func (*UnusedParamRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*UnusedParamRule) Name

func (*UnusedParamRule) Name() string

Name returns the rule name.

type UnusedReceiverRule

type UnusedReceiverRule struct{}

UnusedReceiverRule lints unused params in functions.

func (*UnusedReceiverRule) Apply

func (*UnusedReceiverRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*UnusedReceiverRule) Name

func (*UnusedReceiverRule) Name() string

Name returns the rule name.

type UseAnyRule added in v1.2.0

type UseAnyRule struct{}

UseAnyRule lints given else constructs.

func (*UseAnyRule) Apply added in v1.2.0

func (*UseAnyRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*UseAnyRule) Name added in v1.2.0

func (*UseAnyRule) Name() string

Name returns the rule name.

type UselessBreak added in v1.1.0

type UselessBreak struct{}

UselessBreak lint rule.

func (*UselessBreak) Apply added in v1.1.0

func (*UselessBreak) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*UselessBreak) Name added in v1.1.0

func (*UselessBreak) Name() string

Name returns the rule name.

type VarDeclarationsRule

type VarDeclarationsRule struct{}

VarDeclarationsRule lints given else constructs.

func (*VarDeclarationsRule) Apply

func (*VarDeclarationsRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*VarDeclarationsRule) Name

func (*VarDeclarationsRule) Name() string

Name returns the rule name.

type VarNamingRule

type VarNamingRule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

VarNamingRule lints given else constructs.

func (*VarNamingRule) Apply

func (r *VarNamingRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure

Apply applies the rule to given file.

func (*VarNamingRule) Name

func (*VarNamingRule) Name() string

Name returns the rule name.

type WaitGroupByValueRule

type WaitGroupByValueRule struct{}

WaitGroupByValueRule lints sync.WaitGroup passed by copy in functions.

func (*WaitGroupByValueRule) Apply

Apply applies the rule to given file.

func (*WaitGroupByValueRule) Name

func (*WaitGroupByValueRule) Name() string

Name returns the rule name.

Jump to

Keyboard shortcuts

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