v3.0.0+incompatible Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2019 License: MIT, MIT Imports: 11 Imported by: 0



Package simple contains a linter for Go source code.



This section is empty.


This section is empty.


This section is empty.


type Checker

type Checker struct {
	CheckGenerated bool
	MS             *typeutil.MethodSetCache

func NewChecker

func NewChecker() *Checker

func (*Checker) Checks

func (c *Checker) Checks() []lint.Check

func (*Checker) Implements

func (c *Checker) Implements(j *lint.Job, typ types.Type, iface string) bool

func (*Checker) Init

func (c *Checker) Init(prog *lint.Program)

func (*Checker) LintAssertNotNil

func (c *Checker) LintAssertNotNil(j *lint.Job)

func (*Checker) LintBytesBufferConversions

func (c *Checker) LintBytesBufferConversions(j *lint.Job)

func (*Checker) LintBytesCompare

func (c *Checker) LintBytesCompare(j *lint.Job)

func (*Checker) LintDeclareAssign

func (c *Checker) LintDeclareAssign(j *lint.Job)

func (*Checker) LintErrorsNewSprintf

func (c *Checker) LintErrorsNewSprintf(j *lint.Job)

func (*Checker) LintForTrue

func (c *Checker) LintForTrue(j *lint.Job)

func (*Checker) LintGuardedDelete

func (c *Checker) LintGuardedDelete(j *lint.Job)

func (*Checker) LintIfBoolCmp

func (c *Checker) LintIfBoolCmp(j *lint.Job)

func (*Checker) LintIfReturn

func (c *Checker) LintIfReturn(j *lint.Job)

func (*Checker) LintLoopAppend

func (c *Checker) LintLoopAppend(j *lint.Job)

func (*Checker) LintLoopCopy

func (c *Checker) LintLoopCopy(j *lint.Job)

func (*Checker) LintLoopSlide

func (c *Checker) LintLoopSlide(j *lint.Job)

func (*Checker) LintMakeLenCap

func (c *Checker) LintMakeLenCap(j *lint.Job)

func (*Checker) LintNilCheckAroundRange

func (c *Checker) LintNilCheckAroundRange(j *lint.Job)

func (*Checker) LintRangeStringRunes

func (c *Checker) LintRangeStringRunes(j *lint.Job)

func (*Checker) LintRedundantBreak

func (c *Checker) LintRedundantBreak(j *lint.Job)

func (*Checker) LintRedundantNilCheckWithLen

func (c *Checker) LintRedundantNilCheckWithLen(j *lint.Job)

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 (c *Checker) LintRedundantSprintf(j *lint.Job)

func (*Checker) LintRegexpRaw

func (c *Checker) LintRegexpRaw(j *lint.Job)

func (*Checker) LintSimplerStructConversion

func (c *Checker) LintSimplerStructConversion(j *lint.Job)

func (*Checker) LintSimplifyTypeSwitch

func (c *Checker) LintSimplifyTypeSwitch(j *lint.Job)

func (*Checker) LintSingleCaseSelect

func (c *Checker) LintSingleCaseSelect(j *lint.Job)

func (*Checker) LintSlicing

func (c *Checker) LintSlicing(j *lint.Job)

func (*Checker) LintSortHelpers

func (c *Checker) LintSortHelpers(j *lint.Job)

func (*Checker) LintStringsContains

func (c *Checker) LintStringsContains(j *lint.Job)

func (*Checker) LintTimeSince

func (c *Checker) LintTimeSince(j *lint.Job)

func (*Checker) LintTimeUntil

func (c *Checker) LintTimeUntil(j *lint.Job)

func (*Checker) LintTrim

func (c *Checker) LintTrim(j *lint.Job)

func (*Checker) LintUnnecessaryBlank

func (c *Checker) LintUnnecessaryBlank(j *lint.Job)

func (*Checker) Name

func (*Checker) Name() string

func (*Checker) Prefix

func (*Checker) Prefix() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL