simple

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: MIT, MIT Imports: 9 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
}

func NewChecker

func NewChecker() *Checker

func (*Checker) Funcs

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

func (*Checker) Init

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

func (*Checker) LintAssertNotNil

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

func (*Checker) LintBlankOK

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

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

func (*Checker) LintFormatInt

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

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

func (*Checker) LintReceiveIntoBlank

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

Jump to

Keyboard shortcuts

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