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) Init(*lint.Program)
- func (c *Checker) LintAssertNotNil(j *lint.Job)
- func (c *Checker) LintBlankOK(j *lint.Job)
- func (c *Checker) LintBytesCompare(j *lint.Job)
- func (c *Checker) LintDeclareAssign(j *lint.Job)
- func (c *Checker) LintForTrue(j *lint.Job)
- func (c *Checker) LintFormatInt(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) LintRanges(j *lint.Job)
- func (c *Checker) LintReceiveIntoBlank(j *lint.Job)
- func (c *Checker) LintRedundantBreak(j *lint.Job)
- func (c *Checker) LintRedundantNilCheckWithLen(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) 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)
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) LintAssertNotNil ¶
func (*Checker) LintBlankOK ¶
func (*Checker) LintBytesCompare ¶
func (*Checker) LintDeclareAssign ¶
func (*Checker) LintForTrue ¶
func (*Checker) LintFormatInt ¶
func (*Checker) LintIfBoolCmp ¶
func (*Checker) LintIfReturn ¶
func (*Checker) LintLoopAppend ¶
func (*Checker) LintLoopCopy ¶
func (*Checker) LintLoopSlide ¶
func (*Checker) LintMakeLenCap ¶
func (*Checker) LintRanges ¶
func (*Checker) LintReceiveIntoBlank ¶
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) LintRegexpRaw ¶
func (*Checker) LintSimplerReturn ¶
func (*Checker) LintSimplerStructConversion ¶
func (*Checker) LintSingleCaseSelect ¶
func (*Checker) LintSlicing ¶
func (*Checker) LintStringsContains ¶
func (*Checker) LintTimeSince ¶
func (*Checker) LintTimeUntil ¶
Click to show internal directories.
Click to hide internal directories.