Documentation ¶
Index ¶
- type AddConstantRule
- type ArgumentsLimitRule
- type AtomicRule
- type BareReturnRule
- type BlankImportsRule
- type BoolLiteralRule
- type CallToGCRule
- type CognitiveComplexityRule
- type ConfusingNamingRule
- type ConfusingResultsRule
- type ConstantLogicalExprRule
- type ContextAsArgumentRule
- type ContextKeysType
- type CyclomaticRule
- type DeepExitRule
- type DeferRule
- type DotImportsRule
- type DuplicatedImportsRule
- type EarlyReturnRule
- type EmptyBlockRule
- type EmptyLinesRule
- type ErrorNamingRule
- type ErrorReturnRule
- type ErrorStringsRule
- type ErrorfRule
- type ExportedRule
- type FileHeaderRule
- type FlagParamRule
- type FunctionLength
- type FunctionResultsLimitRule
- type GetReturnRule
- type IdenticalBranchesRule
- type IfReturnRule
- type ImportShadowingRule
- type ImportsBlacklistRule
- type IncrementDecrementRule
- type IndentErrorFlowRule
- type LineLengthLimitRule
- type MaxPublicStructsRule
- type ModifiesParamRule
- type ModifiesValRecRule
- type PackageCommentsRule
- type RangeRule
- type RangeValAddress
- type RangeValInClosureRule
- type ReceiverNamingRule
- type RedefinesBuiltinIDRule
- type StringFormatRule
- type StringOfIntRule
- type StructTagRule
- type SuperfluousElseRule
- type TimeNamingRule
- type UnconditionalRecursionRule
- type UnexportedNamingRule
- type UnexportedReturnRule
- type UnhandledErrorRule
- type UnnecessaryStmtRule
- type UnreachableCodeRule
- type UnusedParamRule
- type UnusedReceiverRule
- type VarDeclarationsRule
- type VarNamingRule
- type WaitGroupByValueRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddConstantRule ¶
type AddConstantRule struct{}
AddConstantRule lints unused params in functions.
type ArgumentsLimitRule ¶
type ArgumentsLimitRule struct{}
ArgumentsLimitRule lints given else constructs.
func (*ArgumentsLimitRule) Name ¶
func (r *ArgumentsLimitRule) Name() string
Name returns the rule name.
type AtomicRule ¶
type AtomicRule struct{}
AtomicRule lints given else constructs.
type BareReturnRule ¶
type BareReturnRule struct{}
BareReturnRule lints given else constructs.
type BlankImportsRule ¶
type BlankImportsRule struct{}
BlankImportsRule lints given else constructs.
func (*BlankImportsRule) Name ¶
func (r *BlankImportsRule) Name() string
Name returns the rule name.
type BoolLiteralRule ¶
type BoolLiteralRule struct{}
BoolLiteralRule warns when logic expressions contains Boolean literals.
type CallToGCRule ¶
type CallToGCRule struct{}
CallToGCRule lints calls to the garbage collector.
type CognitiveComplexityRule ¶
type CognitiveComplexityRule struct{}
CognitiveComplexityRule lints given else constructs.
func (*CognitiveComplexityRule) Name ¶
func (r *CognitiveComplexityRule) Name() string
Name returns the rule name.
type ConfusingNamingRule ¶
type ConfusingNamingRule struct{}
ConfusingNamingRule lints method names that differ only by capitalization
func (*ConfusingNamingRule) Name ¶
func (r *ConfusingNamingRule) Name() string
Name returns the rule name.
type ConfusingResultsRule ¶
type ConfusingResultsRule struct{}
ConfusingResultsRule lints given function declarations
func (*ConfusingResultsRule) Name ¶
func (r *ConfusingResultsRule) Name() string
Name returns the rule name.
type ConstantLogicalExprRule ¶
type ConstantLogicalExprRule struct{}
ConstantLogicalExprRule warns on constant logical expressions.
func (*ConstantLogicalExprRule) Name ¶
func (r *ConstantLogicalExprRule) Name() string
Name returns the rule name.
type ContextAsArgumentRule ¶
type ContextAsArgumentRule struct{}
ContextAsArgumentRule lints given else constructs.
func (*ContextAsArgumentRule) Name ¶
func (r *ContextAsArgumentRule) Name() string
Name returns the rule name.
type ContextKeysType ¶
type ContextKeysType struct{}
ContextKeysType lints given else constructs.
type CyclomaticRule ¶
type CyclomaticRule struct{}
CyclomaticRule lints given else constructs.
type DeepExitRule ¶
type DeepExitRule struct{}
DeepExitRule lints program exit at functions other than main or init.
type DeferRule ¶
type DeferRule struct{}
DeferRule lints unused params in functions.
type DotImportsRule ¶
type DotImportsRule struct{}
DotImportsRule lints given else constructs.
type DuplicatedImportsRule ¶
type DuplicatedImportsRule struct{}
DuplicatedImportsRule lints given else constructs.
func (*DuplicatedImportsRule) Name ¶
func (r *DuplicatedImportsRule) Name() string
Name returns the rule name.
type EarlyReturnRule ¶
type EarlyReturnRule struct{}
EarlyReturnRule lints given else constructs.
type EmptyBlockRule ¶
type EmptyBlockRule struct{}
EmptyBlockRule lints given else constructs.
type EmptyLinesRule ¶
type EmptyLinesRule struct{}
EmptyLinesRule lints empty lines in blocks.
type ErrorNamingRule ¶
type ErrorNamingRule struct{}
ErrorNamingRule lints given else constructs.
type ErrorReturnRule ¶
type ErrorReturnRule struct{}
ErrorReturnRule lints given else constructs.
type ErrorStringsRule ¶
type ErrorStringsRule struct{}
ErrorStringsRule lints given else constructs.
func (*ErrorStringsRule) Name ¶
func (r *ErrorStringsRule) Name() string
Name returns the rule name.
type ErrorfRule ¶
type ErrorfRule struct{}
ErrorfRule lints given else constructs.
type ExportedRule ¶
type ExportedRule struct{}
ExportedRule lints given else constructs.
type FileHeaderRule ¶
type FileHeaderRule struct{}
FileHeaderRule lints given else constructs.
type FlagParamRule ¶
type FlagParamRule struct{}
FlagParamRule lints given else constructs.
type FunctionLength ¶
type FunctionLength struct{}
FunctionLength lint.
type FunctionResultsLimitRule ¶
type FunctionResultsLimitRule struct{}
FunctionResultsLimitRule lints given else constructs.
func (*FunctionResultsLimitRule) Name ¶
func (r *FunctionResultsLimitRule) Name() string
Name returns the rule name.
type GetReturnRule ¶
type GetReturnRule struct{}
GetReturnRule lints given else constructs.
type IdenticalBranchesRule ¶
type IdenticalBranchesRule struct{}
IdenticalBranchesRule warns on constant logical expressions.
func (*IdenticalBranchesRule) Name ¶
func (r *IdenticalBranchesRule) Name() string
Name returns the rule name.
type IfReturnRule ¶
type IfReturnRule struct{}
IfReturnRule lints given else constructs.
type ImportShadowingRule ¶
type ImportShadowingRule struct{}
ImportShadowingRule lints given else constructs.
func (*ImportShadowingRule) Name ¶
func (r *ImportShadowingRule) Name() string
Name returns the rule name.
type ImportsBlacklistRule ¶
type ImportsBlacklistRule struct{}
ImportsBlacklistRule lints given else constructs.
func (*ImportsBlacklistRule) Name ¶
func (r *ImportsBlacklistRule) Name() string
Name returns the rule name.
type IncrementDecrementRule ¶
type IncrementDecrementRule struct{}
IncrementDecrementRule lints given else constructs.
func (*IncrementDecrementRule) Name ¶
func (r *IncrementDecrementRule) Name() string
Name returns the rule name.
type IndentErrorFlowRule ¶
type IndentErrorFlowRule struct{}
IndentErrorFlowRule lints given else constructs.
func (*IndentErrorFlowRule) Name ¶
func (r *IndentErrorFlowRule) Name() string
Name returns the rule name.
type LineLengthLimitRule ¶
type LineLengthLimitRule struct{}
LineLengthLimitRule lints given else constructs.
func (*LineLengthLimitRule) Name ¶
func (r *LineLengthLimitRule) Name() string
Name returns the rule name.
type MaxPublicStructsRule ¶
type MaxPublicStructsRule struct{}
MaxPublicStructsRule lints given else constructs.
func (*MaxPublicStructsRule) Name ¶
func (r *MaxPublicStructsRule) Name() string
Name returns the rule name.
type ModifiesParamRule ¶
type ModifiesParamRule struct{}
ModifiesParamRule lints given else constructs.
func (*ModifiesParamRule) Name ¶
func (r *ModifiesParamRule) Name() string
Name returns the rule name.
type ModifiesValRecRule ¶
type ModifiesValRecRule struct{}
ModifiesValRecRule lints assignments to value method-receivers.
func (*ModifiesValRecRule) Name ¶
func (r *ModifiesValRecRule) Name() string
Name returns the rule name.
type PackageCommentsRule ¶
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) Name ¶
func (r *PackageCommentsRule) Name() string
Name returns the rule name.
type RangeRule ¶
type RangeRule struct{}
RangeRule lints given else constructs.
type RangeValAddress ¶
type RangeValAddress struct{}
RangeValAddress lints
type RangeValInClosureRule ¶
type RangeValInClosureRule struct{}
RangeValInClosureRule lints given else constructs.
func (*RangeValInClosureRule) Name ¶
func (r *RangeValInClosureRule) Name() string
Name returns the rule name.
type ReceiverNamingRule ¶
type ReceiverNamingRule struct{}
ReceiverNamingRule lints given else constructs.
func (*ReceiverNamingRule) Name ¶
func (r *ReceiverNamingRule) Name() string
Name returns the rule name.
type RedefinesBuiltinIDRule ¶
type RedefinesBuiltinIDRule struct{}
RedefinesBuiltinIDRule warns when a builtin identifier is shadowed.
func (*RedefinesBuiltinIDRule) Name ¶
func (r *RedefinesBuiltinIDRule) Name() string
Name returns the rule name.
type StringFormatRule ¶
type StringFormatRule struct{}
StringFormatRule lints strings and/or comments according to a set of regular expressions given as Arguments
func (*StringFormatRule) Name ¶
func (r *StringFormatRule) Name() string
Name returns the rule name.
func (*StringFormatRule) ParseArgumentsTest ¶
func (r *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 ¶
type StringOfIntRule struct{}
StringOfIntRule warns when logic expressions contains Boolean literals.
type StructTagRule ¶
type StructTagRule struct{}
StructTagRule lints struct tags.
type SuperfluousElseRule ¶
type SuperfluousElseRule struct{}
SuperfluousElseRule lints given else constructs.
func (*SuperfluousElseRule) Name ¶
func (r *SuperfluousElseRule) Name() string
Name returns the rule name.
type TimeNamingRule ¶
type TimeNamingRule struct{}
TimeNamingRule lints given else constructs.
type UnconditionalRecursionRule ¶
type UnconditionalRecursionRule struct{}
UnconditionalRecursionRule lints given else constructs.
func (*UnconditionalRecursionRule) Name ¶
func (r *UnconditionalRecursionRule) Name() string
Name returns the rule name.
type UnexportedNamingRule ¶
type UnexportedNamingRule struct{}
UnexportedNamingRule lints wrongly named unexported symbols.
func (*UnexportedNamingRule) Name ¶
func (r *UnexportedNamingRule) Name() string
Name returns the rule name.
type UnexportedReturnRule ¶
type UnexportedReturnRule struct{}
UnexportedReturnRule lints given else constructs.
func (*UnexportedReturnRule) Name ¶
func (r *UnexportedReturnRule) Name() string
Name returns the rule name.
type UnhandledErrorRule ¶
type UnhandledErrorRule struct{}
UnhandledErrorRule lints given else constructs.
func (*UnhandledErrorRule) Name ¶
func (r *UnhandledErrorRule) Name() string
Name returns the rule name.
type UnnecessaryStmtRule ¶
type UnnecessaryStmtRule struct{}
UnnecessaryStmtRule warns on unnecessary statements.
func (*UnnecessaryStmtRule) Name ¶
func (r *UnnecessaryStmtRule) Name() string
Name returns the rule name.
type UnreachableCodeRule ¶
type UnreachableCodeRule struct{}
UnreachableCodeRule lints unreachable code.
func (*UnreachableCodeRule) Name ¶
func (r *UnreachableCodeRule) Name() string
Name returns the rule name.
type UnusedParamRule ¶
type UnusedParamRule struct{}
UnusedParamRule lints unused params in functions.
type UnusedReceiverRule ¶
type UnusedReceiverRule struct{}
UnusedReceiverRule lints unused params in functions.
func (*UnusedReceiverRule) Name ¶
func (*UnusedReceiverRule) Name() string
Name returns the rule name.
type VarDeclarationsRule ¶
type VarDeclarationsRule struct{}
VarDeclarationsRule lints given else constructs.
func (*VarDeclarationsRule) Name ¶
func (r *VarDeclarationsRule) Name() string
Name returns the rule name.
type VarNamingRule ¶
type VarNamingRule struct{}
VarNamingRule lints given else constructs.
type WaitGroupByValueRule ¶
type WaitGroupByValueRule struct{}
WaitGroupByValueRule lints sync.WaitGroup passed by copy in functions.
func (*WaitGroupByValueRule) Name ¶
func (r *WaitGroupByValueRule) Name() string
Name returns the rule name.
Source 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-length.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-format.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