lint: github.com/surullabs/lint/gometalinter Index | Examples | Files

package gometalinter

import "github.com/surullabs/lint/gometalinter"

Code:

metalinter := gometalinter.Check{
    Args: []string{
        // These are not recommendations for linters to disable.
        "--disable=gocyclo",
        "--disable=gas",
        "--deadline=20s",
    },
}
if err := metalinter.Check("./..."); err != nil {
    log.Fatal(err)
}

Index

Examples

Package Files

metalinter.go

type Check Uses

type Check struct {
    Args []string
}

Check implements a check using a vendored version of gometalinter. Args are the arguments passed to gometalinter. Do not include directory names in Args. These will be added automatically, based on the arguments to Check(pkgs).

func (Check) Check Uses

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

Check runs a vendored version of gometalinter. It builds the metalinter by detecting the location of the vendor directory and using that as the GOPATH for building the metalinter binary. This is similar to what gometalinter does internally.

Package gometalinter imports 7 packages (graph). Updated 2016-11-28. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).