simple: honnef.co/go/simple Index | Files | Directories

package simple

import "honnef.co/go/simple"

Package simple contains a linter for Go source code.

Index

Package Files

lint.go lint17.go

Variables

var Funcs = map[string]lint.Func{
    "S1000": LintSingleCaseSelect,
    "S1001": LintLoopCopy,
    "S1002": LintIfBoolCmp,
    "S1003": LintStringsContains,
    "S1004": LintBytesCompare,
    "S1005": LintRanges,
    "S1006": LintForTrue,
    "S1007": LintRegexpRaw,
    "S1008": LintIfReturn,
    "S1009": LintRedundantNilCheckWithLen,
    "S1010": LintSlicing,
    "S1011": LintLoopAppend,
    "S1012": LintTimeSince,
    "S1013": LintSimplerReturn,
    "S1014": LintReceiveIntoBlank,
    "S1015": LintFormatInt,
    "S1016": LintSimplerStructConversion,
    "S1017": LintTrim,
}

func LintBytesCompare Uses

func LintBytesCompare(f *lint.File)

func LintForTrue Uses

func LintForTrue(f *lint.File)

func LintFormatInt Uses

func LintFormatInt(f *lint.File)

func LintIfBoolCmp Uses

func LintIfBoolCmp(f *lint.File)

func LintIfReturn Uses

func LintIfReturn(f *lint.File)

func LintLoopAppend Uses

func LintLoopAppend(f *lint.File)

func LintLoopCopy Uses

func LintLoopCopy(f *lint.File)

func LintRanges Uses

func LintRanges(f *lint.File)

func LintReceiveIntoBlank Uses

func LintReceiveIntoBlank(f *lint.File)

func LintRedundantNilCheckWithLen Uses

func LintRedundantNilCheckWithLen(f *lint.File)

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 LintRegexpRaw Uses

func LintRegexpRaw(f *lint.File)

func LintSimplerReturn Uses

func LintSimplerReturn(f *lint.File)

func LintSimplerStructConversion Uses

func LintSimplerStructConversion(f *lint.File)

func LintSingleCaseSelect Uses

func LintSingleCaseSelect(f *lint.File)

func LintSlicing Uses

func LintSlicing(f *lint.File)

func LintStringsContains Uses

func LintStringsContains(f *lint.File)

func LintTimeSince Uses

func LintTimeSince(f *lint.File)

func LintTrim Uses

func LintTrim(f *lint.File)

type Checker Uses

type Checker struct{}

func NewChecker Uses

func NewChecker() *Checker

func (*Checker) Funcs Uses

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

func (*Checker) Init Uses

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

Directories

PathSynopsis
cmd/gosimplegosimple lints the Go source files named on its command line.

Package simple imports 9 packages (graph) and is imported by 2 packages. Updated 2017-01-25. Refresh now. Tools for package owners.