Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectLinterFn ¶
ObjectLinterFn lints an object in a package.
func ObjectLinterFns ¶
func ObjectLinterFns(fns ...ObjectLinterFn) []ObjectLinterFn
ObjectLinterFns is a convenience function to pass multiple ObjectLinterFn to a function that cannot accept variadic arguments.
func Or ¶
func Or(linters ...ObjectLinterFn) ObjectLinterFn
Or checks that at least one of the passed linter functions does not return an error.
type PackageLinter ¶
type PackageLinter struct {
// contains filtered or unexported fields
}
PackageLinter lints packages by applying package and object linter functions to it.
func NewPackageLinter ¶
func NewPackageLinter(pre []PackageLinterFn, perMeta, perObject []ObjectLinterFn) *PackageLinter
NewPackageLinter creates a new PackageLinter.
func (*PackageLinter) Lint ¶
func (l *PackageLinter) Lint(pkg Package) error
Lint executes all linter functions against a package.
type PackageLinterFn ¶
PackageLinterFn lints an entire package. If function applies a check for multiple objects, consider using an ObjectLinterFn.
func PackageLinterFns ¶
func PackageLinterFns(fns ...PackageLinterFn) []PackageLinterFn
PackageLinterFns is a convenience function to pass multiple PackageLinterFn to a function that cannot accept variadic arguments.