Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRangeStringRunes ¶
func RedundantTypeInDeclarationChecker ¶ added in v0.2.0
RedundantTypeInDeclarationChecker returns a checker that flags variable declarations with redundantly specified types. That is, it flags 'var v T = e' where e's type is identical to T and 'var v = e' (or 'v := e') would have the same effect.
It does not flag variables under the following conditions, to reduce the number of false positives: - global variables – these often specify types to aid godoc - files that use cgo – cgo code generation and pointer checking emits redundant types
It does not flag variables under the following conditions, unless flagHelpfulTypes is true, to reduce the number of noisy positives: - packages that import syscall or unsafe – these sometimes use this form of assignment to make sure types are as expected - variables named the blank identifier – a pattern used to confirm the types of variables - untyped expressions on the rhs – the explicitness might aid readability
Types ¶
This section is empty.