revive: github.com/mgechev/revive/rule Index | Files

package rule

import "github.com/mgechev/revive/rule"

Index

Package Files

add-constant.go argument-limit.go atomic.go bare-return.go blank-imports.go bool-literal-in-expr.go call-to-gc.go cognitive-complexity.go confusing-naming.go confusing-results.go constant-logical-expr.go context-as-argument.go context-keys-type.go cyclomatic.go deep-exit.go defer.go dot-imports.go duplicated-imports.go early-return.go empty-block.go empty-lines.go error-naming.go error-return.go error-strings.go errorf.go exported.go file-header.go flag-param.go function-result-limit.go get-return.go identical-branches.go if-return.go import-shadowing.go imports-blacklist.go increment-decrement.go indent-error-flow.go line-length-limit.go max-public-structs.go modifies-param.go modifies-value-receiver.go package-comments.go range-val-address.go range-val-in-closure.go range.go receiver-naming.go redefines-builtin-id.go string-of-int.go struct-tag.go superfluous-else.go time-naming.go unconditional-recursion.go unexported-naming.go unexported-return.go unhandled-error.go unnecessary-stmt.go unreachable-code.go unused-param.go unused-receiver.go utils.go var-declarations.go var-naming.go waitgroup-by-value.go

type AddConstantRule Uses

type AddConstantRule struct{}

AddConstantRule lints unused params in functions.

func (*AddConstantRule) Apply Uses

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

Apply applies the rule to given file.

func (*AddConstantRule) Name Uses

func (r *AddConstantRule) Name() string

Name returns the rule name.

type ArgumentsLimitRule Uses

type ArgumentsLimitRule struct{}

ArgumentsLimitRule lints given else constructs.

func (*ArgumentsLimitRule) Apply Uses

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

Apply applies the rule to given file.

func (*ArgumentsLimitRule) Name Uses

func (r *ArgumentsLimitRule) Name() string

Name returns the rule name.

type AtomicRule Uses

type AtomicRule struct{}

AtomicRule lints given else constructs.

func (*AtomicRule) Apply Uses

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

Apply applies the rule to given file.

func (*AtomicRule) Name Uses

func (r *AtomicRule) Name() string

Name returns the rule name.

type BareReturnRule Uses

type BareReturnRule struct{}

BareReturnRule lints given else constructs.

func (*BareReturnRule) Apply Uses

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

Apply applies the rule to given file.

func (*BareReturnRule) Name Uses

func (r *BareReturnRule) Name() string

Name returns the rule name.

type BlankImportsRule Uses

type BlankImportsRule struct{}

BlankImportsRule lints given else constructs.

func (*BlankImportsRule) Apply Uses

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

Apply applies the rule to given file.

func (*BlankImportsRule) Name Uses

func (r *BlankImportsRule) Name() string

Name returns the rule name.

type BoolLiteralRule Uses

type BoolLiteralRule struct{}

BoolLiteralRule warns when logic expressions contains Boolean literals.

func (*BoolLiteralRule) Apply Uses

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

Apply applies the rule to given file.

func (*BoolLiteralRule) Name Uses

func (r *BoolLiteralRule) Name() string

Name returns the rule name.

type CallToGCRule Uses

type CallToGCRule struct{}

CallToGCRule lints calls to the garbage collector.

func (*CallToGCRule) Apply Uses

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

Apply applies the rule to given file.

func (*CallToGCRule) Name Uses

func (r *CallToGCRule) Name() string

Name returns the rule name.

type CognitiveComplexityRule Uses

type CognitiveComplexityRule struct{}

CognitiveComplexityRule lints given else constructs.

func (*CognitiveComplexityRule) Apply Uses

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

Apply applies the rule to given file.

func (*CognitiveComplexityRule) Name Uses

func (r *CognitiveComplexityRule) Name() string

Name returns the rule name.

type ConfusingNamingRule Uses

type ConfusingNamingRule struct{}

ConfusingNamingRule lints method names that differ only by capitalization

func (*ConfusingNamingRule) Apply Uses

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

Apply applies the rule to given file.

func (*ConfusingNamingRule) Name Uses

func (r *ConfusingNamingRule) Name() string

Name returns the rule name.

type ConfusingResultsRule Uses

type ConfusingResultsRule struct{}

ConfusingResultsRule lints given function declarations

func (*ConfusingResultsRule) Apply Uses

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

Apply applies the rule to given file.

func (*ConfusingResultsRule) Name Uses

func (r *ConfusingResultsRule) Name() string

Name returns the rule name.

type ConstantLogicalExprRule Uses

type ConstantLogicalExprRule struct{}

ConstantLogicalExprRule warns on constant logical expressions.

func (*ConstantLogicalExprRule) Apply Uses

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

Apply applies the rule to given file.

func (*ConstantLogicalExprRule) Name Uses

func (r *ConstantLogicalExprRule) Name() string

Name returns the rule name.

type ContextAsArgumentRule Uses

type ContextAsArgumentRule struct{}

ContextAsArgumentRule lints given else constructs.

func (*ContextAsArgumentRule) Apply Uses

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

Apply applies the rule to given file.

func (*ContextAsArgumentRule) Name Uses

func (r *ContextAsArgumentRule) Name() string

Name returns the rule name.

type ContextKeysType Uses

type ContextKeysType struct{}

ContextKeysType lints given else constructs.

func (*ContextKeysType) Apply Uses

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

Apply applies the rule to given file.

func (*ContextKeysType) Name Uses

func (r *ContextKeysType) Name() string

Name returns the rule name.

type CyclomaticRule Uses

type CyclomaticRule struct{}

CyclomaticRule lints given else constructs.

func (*CyclomaticRule) Apply Uses

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

Apply applies the rule to given file.

func (*CyclomaticRule) Name Uses

func (r *CyclomaticRule) Name() string

Name returns the rule name.

type DeepExitRule Uses

type DeepExitRule struct{}

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

func (*DeepExitRule) Apply Uses

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

Apply applies the rule to given file.

func (*DeepExitRule) Name Uses

func (r *DeepExitRule) Name() string

Name returns the rule name.

type DeferRule Uses

type DeferRule struct{}

DeferRule lints unused params in functions.

func (*DeferRule) Apply Uses

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

Apply applies the rule to given file.

func (*DeferRule) Name Uses

func (r *DeferRule) Name() string

Name returns the rule name.

type DotImportsRule Uses

type DotImportsRule struct{}

DotImportsRule lints given else constructs.

func (*DotImportsRule) Apply Uses

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

Apply applies the rule to given file.

func (*DotImportsRule) Name Uses

func (r *DotImportsRule) Name() string

Name returns the rule name.

type DuplicatedImportsRule Uses

type DuplicatedImportsRule struct{}

DuplicatedImportsRule lints given else constructs.

func (*DuplicatedImportsRule) Apply Uses

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

Apply applies the rule to given file.

func (*DuplicatedImportsRule) Name Uses

func (r *DuplicatedImportsRule) Name() string

Name returns the rule name.

type EarlyReturnRule Uses

type EarlyReturnRule struct{}

EarlyReturnRule lints given else constructs.

func (*EarlyReturnRule) Apply Uses

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

Apply applies the rule to given file.

func (*EarlyReturnRule) Name Uses

func (r *EarlyReturnRule) Name() string

Name returns the rule name.

type EmptyBlockRule Uses

type EmptyBlockRule struct{}

EmptyBlockRule lints given else constructs.

func (*EmptyBlockRule) Apply Uses

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

Apply applies the rule to given file.

func (*EmptyBlockRule) Name Uses

func (r *EmptyBlockRule) Name() string

Name returns the rule name.

type EmptyLinesRule Uses

type EmptyLinesRule struct{}

EmptyLinesRule lints empty lines in blocks.

func (*EmptyLinesRule) Apply Uses

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

Apply applies the rule to given file.

func (*EmptyLinesRule) Name Uses

func (r *EmptyLinesRule) Name() string

Name returns the rule name.

type ErrorNamingRule Uses

type ErrorNamingRule struct{}

ErrorNamingRule lints given else constructs.

func (*ErrorNamingRule) Apply Uses

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

Apply applies the rule to given file.

func (*ErrorNamingRule) Name Uses

func (r *ErrorNamingRule) Name() string

Name returns the rule name.

type ErrorReturnRule Uses

type ErrorReturnRule struct{}

ErrorReturnRule lints given else constructs.

func (*ErrorReturnRule) Apply Uses

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

Apply applies the rule to given file.

func (*ErrorReturnRule) Name Uses

func (r *ErrorReturnRule) Name() string

Name returns the rule name.

type ErrorStringsRule Uses

type ErrorStringsRule struct{}

ErrorStringsRule lints given else constructs.

func (*ErrorStringsRule) Apply Uses

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

Apply applies the rule to given file.

func (*ErrorStringsRule) Name Uses

func (r *ErrorStringsRule) Name() string

Name returns the rule name.

type ErrorfRule Uses

type ErrorfRule struct{}

ErrorfRule lints given else constructs.

func (*ErrorfRule) Apply Uses

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

Apply applies the rule to given file.

func (*ErrorfRule) Name Uses

func (r *ErrorfRule) Name() string

Name returns the rule name.

type ExportedRule Uses

type ExportedRule struct{}

ExportedRule lints given else constructs.

func (*ExportedRule) Apply Uses

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

Apply applies the rule to given file.

func (*ExportedRule) Name Uses

func (r *ExportedRule) Name() string

Name returns the rule name.

type FileHeaderRule Uses

type FileHeaderRule struct{}

FileHeaderRule lints given else constructs.

func (*FileHeaderRule) Apply Uses

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

Apply applies the rule to given file.

func (*FileHeaderRule) Name Uses

func (r *FileHeaderRule) Name() string

Name returns the rule name.

type FlagParamRule Uses

type FlagParamRule struct{}

FlagParamRule lints given else constructs.

func (*FlagParamRule) Apply Uses

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

Apply applies the rule to given file.

func (*FlagParamRule) Name Uses

func (r *FlagParamRule) Name() string

Name returns the rule name.

type FunctionResultsLimitRule Uses

type FunctionResultsLimitRule struct{}

FunctionResultsLimitRule lints given else constructs.

func (*FunctionResultsLimitRule) Apply Uses

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

Apply applies the rule to given file.

func (*FunctionResultsLimitRule) Name Uses

func (r *FunctionResultsLimitRule) Name() string

Name returns the rule name.

type GetReturnRule Uses

type GetReturnRule struct{}

GetReturnRule lints given else constructs.

func (*GetReturnRule) Apply Uses

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

Apply applies the rule to given file.

func (*GetReturnRule) Name Uses

func (r *GetReturnRule) Name() string

Name returns the rule name.

type IdenticalBranchesRule Uses

type IdenticalBranchesRule struct{}

IdenticalBranchesRule warns on constant logical expressions.

func (*IdenticalBranchesRule) Apply Uses

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

Apply applies the rule to given file.

func (*IdenticalBranchesRule) Name Uses

func (r *IdenticalBranchesRule) Name() string

Name returns the rule name.

type IfReturnRule Uses

type IfReturnRule struct{}

IfReturnRule lints given else constructs.

func (*IfReturnRule) Apply Uses

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

Apply applies the rule to given file.

func (*IfReturnRule) Name Uses

func (r *IfReturnRule) Name() string

Name returns the rule name.

type ImportShadowingRule Uses

type ImportShadowingRule struct{}

ImportShadowingRule lints given else constructs.

func (*ImportShadowingRule) Apply Uses

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

Apply applies the rule to given file.

func (*ImportShadowingRule) Name Uses

func (r *ImportShadowingRule) Name() string

Name returns the rule name.

type ImportsBlacklistRule Uses

type ImportsBlacklistRule struct{}

ImportsBlacklistRule lints given else constructs.

func (*ImportsBlacklistRule) Apply Uses

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

Apply applies the rule to given file.

func (*ImportsBlacklistRule) Name Uses

func (r *ImportsBlacklistRule) Name() string

Name returns the rule name.

type IncrementDecrementRule Uses

type IncrementDecrementRule struct{}

IncrementDecrementRule lints given else constructs.

func (*IncrementDecrementRule) Apply Uses

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

Apply applies the rule to given file.

func (*IncrementDecrementRule) Name Uses

func (r *IncrementDecrementRule) Name() string

Name returns the rule name.

type IndentErrorFlowRule Uses

type IndentErrorFlowRule struct{}

IndentErrorFlowRule lints given else constructs.

func (*IndentErrorFlowRule) Apply Uses

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

Apply applies the rule to given file.

func (*IndentErrorFlowRule) Name Uses

func (r *IndentErrorFlowRule) Name() string

Name returns the rule name.

type LineLengthLimitRule Uses

type LineLengthLimitRule struct{}

LineLengthLimitRule lints given else constructs.

func (*LineLengthLimitRule) Apply Uses

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

Apply applies the rule to given file.

func (*LineLengthLimitRule) Name Uses

func (r *LineLengthLimitRule) Name() string

Name returns the rule name.

type MaxPublicStructsRule Uses

type MaxPublicStructsRule struct{}

MaxPublicStructsRule lints given else constructs.

func (*MaxPublicStructsRule) Apply Uses

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

Apply applies the rule to given file.

func (*MaxPublicStructsRule) Name Uses

func (r *MaxPublicStructsRule) Name() string

Name returns the rule name.

type ModifiesParamRule Uses

type ModifiesParamRule struct{}

ModifiesParamRule lints given else constructs.

func (*ModifiesParamRule) Apply Uses

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

Apply applies the rule to given file.

func (*ModifiesParamRule) Name Uses

func (r *ModifiesParamRule) Name() string

Name returns the rule name.

type ModifiesValRecRule Uses

type ModifiesValRecRule struct{}

ModifiesValRecRule lints assignments to value method-receivers.

func (*ModifiesValRecRule) Apply Uses

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

Apply applies the rule to given file.

func (*ModifiesValRecRule) Name Uses

func (r *ModifiesValRecRule) Name() string

Name returns the rule name.

type PackageCommentsRule Uses

type PackageCommentsRule struct{}

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 Uses

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

Apply applies the rule to given file.

func (*PackageCommentsRule) Name Uses

func (r *PackageCommentsRule) Name() string

Name returns the rule name.

type RangeRule Uses

type RangeRule struct{}

RangeRule lints given else constructs.

func (*RangeRule) Apply Uses

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

Apply applies the rule to given file.

func (*RangeRule) Name Uses

func (r *RangeRule) Name() string

Name returns the rule name.

type RangeValAddress Uses

type RangeValAddress struct{}

RangeValAddress lints

func (*RangeValAddress) Apply Uses

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

Apply applies the rule to given file.

func (*RangeValAddress) Name Uses

func (r *RangeValAddress) Name() string

Name returns the rule name.

type RangeValInClosureRule Uses

type RangeValInClosureRule struct{}

RangeValInClosureRule lints given else constructs.

func (*RangeValInClosureRule) Apply Uses

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

Apply applies the rule to given file.

func (*RangeValInClosureRule) Name Uses

func (r *RangeValInClosureRule) Name() string

Name returns the rule name.

type ReceiverNamingRule Uses

type ReceiverNamingRule struct{}

ReceiverNamingRule lints given else constructs.

func (*ReceiverNamingRule) Apply Uses

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

Apply applies the rule to given file.

func (*ReceiverNamingRule) Name Uses

func (r *ReceiverNamingRule) Name() string

Name returns the rule name.

type RedefinesBuiltinIDRule Uses

type RedefinesBuiltinIDRule struct{}

RedefinesBuiltinIDRule warns when a builtin identifier is shadowed.

func (*RedefinesBuiltinIDRule) Apply Uses

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

Apply applies the rule to given file.

func (*RedefinesBuiltinIDRule) Name Uses

func (r *RedefinesBuiltinIDRule) Name() string

Name returns the rule name.

type StringOfIntRule Uses

type StringOfIntRule struct{}

StringOfIntRule warns when logic expressions contains Boolean literals.

func (*StringOfIntRule) Apply Uses

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

Apply applies the rule to given file.

func (*StringOfIntRule) Name Uses

func (r *StringOfIntRule) Name() string

Name returns the rule name.

type StructTagRule Uses

type StructTagRule struct{}

StructTagRule lints struct tags.

func (*StructTagRule) Apply Uses

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

Apply applies the rule to given file.

func (*StructTagRule) Name Uses

func (r *StructTagRule) Name() string

Name returns the rule name.

type SuperfluousElseRule Uses

type SuperfluousElseRule struct{}

SuperfluousElseRule lints given else constructs.

func (*SuperfluousElseRule) Apply Uses

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

Apply applies the rule to given file.

func (*SuperfluousElseRule) Name Uses

func (r *SuperfluousElseRule) Name() string

Name returns the rule name.

type TimeNamingRule Uses

type TimeNamingRule struct{}

TimeNamingRule lints given else constructs.

func (*TimeNamingRule) Apply Uses

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

Apply applies the rule to given file.

func (*TimeNamingRule) Name Uses

func (r *TimeNamingRule) Name() string

Name returns the rule name.

type UnconditionalRecursionRule Uses

type UnconditionalRecursionRule struct{}

UnconditionalRecursionRule lints given else constructs.

func (*UnconditionalRecursionRule) Apply Uses

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

Apply applies the rule to given file.

func (*UnconditionalRecursionRule) Name Uses

func (r *UnconditionalRecursionRule) Name() string

Name returns the rule name.

type UnexportedNamingRule Uses

type UnexportedNamingRule struct{}

UnexportedNamingRule lints wrongly named unexported symbols.

func (*UnexportedNamingRule) Apply Uses

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

Apply applies the rule to given file.

func (*UnexportedNamingRule) Name Uses

func (r *UnexportedNamingRule) Name() string

Name returns the rule name.

type UnexportedReturnRule Uses

type UnexportedReturnRule struct{}

UnexportedReturnRule lints given else constructs.

func (*UnexportedReturnRule) Apply Uses

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

Apply applies the rule to given file.

func (*UnexportedReturnRule) Name Uses

func (r *UnexportedReturnRule) Name() string

Name returns the rule name.

type UnhandledErrorRule Uses

type UnhandledErrorRule struct{}

UnhandledErrorRule lints given else constructs.

func (*UnhandledErrorRule) Apply Uses

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

Apply applies the rule to given file.

func (*UnhandledErrorRule) Name Uses

func (r *UnhandledErrorRule) Name() string

Name returns the rule name.

type UnnecessaryStmtRule Uses

type UnnecessaryStmtRule struct{}

UnnecessaryStmtRule warns on unnecessary statements.

func (*UnnecessaryStmtRule) Apply Uses

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

Apply applies the rule to given file.

func (*UnnecessaryStmtRule) Name Uses

func (r *UnnecessaryStmtRule) Name() string

Name returns the rule name.

type UnreachableCodeRule Uses

type UnreachableCodeRule struct{}

UnreachableCodeRule lints unreachable code.

func (*UnreachableCodeRule) Apply Uses

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

Apply applies the rule to given file.

func (*UnreachableCodeRule) Name Uses

func (r *UnreachableCodeRule) Name() string

Name returns the rule name.

type UnusedParamRule Uses

type UnusedParamRule struct{}

UnusedParamRule lints unused params in functions.

func (*UnusedParamRule) Apply Uses

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

Apply applies the rule to given file.

func (*UnusedParamRule) Name Uses

func (r *UnusedParamRule) Name() string

Name returns the rule name.

type UnusedReceiverRule Uses

type UnusedReceiverRule struct{}

UnusedReceiverRule lints unused params in functions.

func (*UnusedReceiverRule) Apply Uses

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

Apply applies the rule to given file.

func (*UnusedReceiverRule) Name Uses

func (*UnusedReceiverRule) Name() string

Name returns the rule name.

type VarDeclarationsRule Uses

type VarDeclarationsRule struct{}

VarDeclarationsRule lints given else constructs.

func (*VarDeclarationsRule) Apply Uses

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

Apply applies the rule to given file.

func (*VarDeclarationsRule) Name Uses

func (r *VarDeclarationsRule) Name() string

Name returns the rule name.

type VarNamingRule Uses

type VarNamingRule struct{}

VarNamingRule lints given else constructs.

func (*VarNamingRule) Apply Uses

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

Apply applies the rule to given file.

func (*VarNamingRule) Name Uses

func (r *VarNamingRule) Name() string

Name returns the rule name.

type WaitGroupByValueRule Uses

type WaitGroupByValueRule struct{}

WaitGroupByValueRule lints sync.WaitGroup passed by copy in functions.

func (*WaitGroupByValueRule) Apply Uses

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

Apply applies the rule to given file.

func (*WaitGroupByValueRule) Name Uses

func (r *WaitGroupByValueRule) Name() string

Name returns the rule name.

Package rule imports 16 packages (graph) and is imported by 7 packages. Updated 2020-08-15. Refresh now. Tools for package owners.