simple

package
v2.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2018 License: MIT, MIT Imports: 10 Imported by: 0

Documentation

Overview

Package simple contains a linter for Go source code.

Index

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) Funcs

func (c *Checker) Funcs() map[string]lint.Func

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) 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) LintSimplerReturn

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

func (*Checker) LintSimplerStructConversion

func (c *Checker) LintSimplerStructConversion(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) 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