Documentation ¶
Overview ¶
Package simple contains a linter for Go source code.
Index ¶
- type Checker
- func (c *Checker) Checks() []lint.Check
- func (c *Checker) Implements(j *lint.Job, typ types.Type, iface string) bool
- func (c *Checker) Init(prog *lint.Program)
- func (c *Checker) LintAssertNotNil(j *lint.Job)
- func (c *Checker) LintBytesBufferConversions(j *lint.Job)
- func (c *Checker) LintBytesCompare(j *lint.Job)
- func (c *Checker) LintDeclareAssign(j *lint.Job)
- func (c *Checker) LintErrorsNewSprintf(j *lint.Job)
- func (c *Checker) LintForTrue(j *lint.Job)
- func (c *Checker) LintGuardedDelete(j *lint.Job)
- func (c *Checker) LintIfBoolCmp(j *lint.Job)
- func (c *Checker) LintIfReturn(j *lint.Job)
- func (c *Checker) LintLoopAppend(j *lint.Job)
- func (c *Checker) LintLoopCopy(j *lint.Job)
- func (c *Checker) LintLoopSlide(j *lint.Job)
- func (c *Checker) LintMakeLenCap(j *lint.Job)
- func (c *Checker) LintNilCheckAroundRange(j *lint.Job)
- func (c *Checker) LintRangeStringRunes(j *lint.Job)
- func (c *Checker) LintRedundantBreak(j *lint.Job)
- func (c *Checker) LintRedundantNilCheckWithLen(j *lint.Job)
- func (c *Checker) LintRedundantSprintf(j *lint.Job)
- func (c *Checker) LintRegexpRaw(j *lint.Job)
- func (c *Checker) LintSimplerStructConversion(j *lint.Job)
- func (c *Checker) LintSimplifyTypeSwitch(j *lint.Job)
- func (c *Checker) LintSingleCaseSelect(j *lint.Job)
- func (c *Checker) LintSlicing(j *lint.Job)
- func (c *Checker) LintSortHelpers(j *lint.Job)
- func (c *Checker) LintStringsContains(j *lint.Job)
- func (c *Checker) LintTimeSince(j *lint.Job)
- func (c *Checker) LintTimeUntil(j *lint.Job)
- func (c *Checker) LintTrim(j *lint.Job)
- func (c *Checker) LintUnnecessaryBlank(j *lint.Job)
- func (*Checker) Name() string
- func (*Checker) Prefix() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct { CheckGenerated bool MS *typeutil.MethodSetCache }
func NewChecker ¶
func NewChecker() *Checker
func (*Checker) Implements ¶
func (*Checker) LintAssertNotNil ¶
func (*Checker) LintBytesBufferConversions ¶
func (*Checker) LintBytesCompare ¶
func (*Checker) LintDeclareAssign ¶
func (*Checker) LintErrorsNewSprintf ¶
func (*Checker) LintForTrue ¶
func (*Checker) LintGuardedDelete ¶
func (*Checker) LintIfBoolCmp ¶
func (*Checker) LintIfReturn ¶
func (*Checker) LintLoopAppend ¶
func (*Checker) LintLoopCopy ¶
func (*Checker) LintLoopSlide ¶
func (*Checker) LintMakeLenCap ¶
func (*Checker) LintNilCheckAroundRange ¶
func (*Checker) LintRangeStringRunes ¶
func (*Checker) LintRedundantBreak ¶
func (*Checker) LintRedundantNilCheckWithLen ¶
LintRedundantNilCheckWithLen checks for the following reduntant nil-checks:
if x == nil || len(x) == 0 {} if x != nil && len(x) != 0 {} if x != nil && len(x) == N {} (where N != 0) if x != nil && len(x) > N {} if x != nil && len(x) >= N {} (where N != 0)
func (*Checker) LintRedundantSprintf ¶
func (*Checker) LintRegexpRaw ¶
func (*Checker) LintSimplerStructConversion ¶
func (*Checker) LintSimplifyTypeSwitch ¶
func (*Checker) LintSingleCaseSelect ¶
func (*Checker) LintSlicing ¶
func (*Checker) LintSortHelpers ¶
func (*Checker) LintStringsContains ¶
func (*Checker) LintTimeSince ¶
func (*Checker) LintTimeUntil ¶
func (*Checker) LintUnnecessaryBlank ¶
Click to show internal directories.
Click to hide internal directories.