dupl

package
v0.0.0-...-f90256a Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SkipTwo = skipFunc(func(str string) bool {
	return strings.HasPrefix(str, "dupl.Check: found 2 clones:") ||
		strings.HasPrefix(str, "found 2 clones:")
})

SkipTwo implements Skipper and skips all duplicates having just two instances.

Functions

func Skip

func Skip(suffix string) lint.Skipper

Skip returns a Skipper which ignores the dup whose first instance ends with suffix.

c = lint.Skip(c, Skip("lint.go:1,12"))

Types

type Check

type Check struct {
	Threshold int
}

Check is implements lint.Checker for gofmt.

func (Check) Check

func (c Check) Check(pkgs ...string) error

Check runs

dupl <files>

for all files in pkgs.

Jump to

Keyboard shortcuts

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