Documentation ¶
Overview ¶
Package simple contains a linter for Go source code.
Index ¶
- type Checker
- func (c *Checker) Funcs() map[string]lint.Func
- 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) 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) LintSimplerReturn(j *lint.Job)
- func (c *Checker) LintSimplerStructConversion(j *lint.Job)
- func (c *Checker) LintSingleCaseSelect(j *lint.Job)
- func (c *Checker) LintSlicing(j *lint.Job)
- func (c *Checker) LintStringCopy(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)
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 // contains filtered or unexported fields }
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) 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) LintSimplerReturn ¶
func (*Checker) LintSimplerStructConversion ¶
func (*Checker) LintSingleCaseSelect ¶
func (*Checker) LintSlicing ¶
func (*Checker) LintStringCopy ¶
func (*Checker) LintStringsContains ¶
func (*Checker) LintTimeSince ¶
func (*Checker) LintTimeUntil ¶
func (*Checker) LintUnnecessaryBlank ¶
Click to show internal directories.
Click to hide internal directories.