gometalinter

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: 7 Imported by: 0

Documentation

Overview

Example
package main

import (
	"log"

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

func main() {
	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)
	}

}
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

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

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.

Directories

Path Synopsis
_vendored
src/github.com/alecthomas/template
Package template implements data-driven templates for generating textual output.
Package template implements data-driven templates for generating textual output.
src/github.com/alecthomas/template/parse
Package parse builds parse trees for templates as defined by text/template and html/template.
Package parse builds parse trees for templates as defined by text/template and html/template.
src/github.com/alecthomas/units
Package units provides helpful unit multipliers and functions for Go.
Package units provides helpful unit multipliers and functions for Go.
src/github.com/google/shlex
Package shlex implements a simple lexer which splits input in to tokens using shell-style rules for quoting and commenting.
Package shlex implements a simple lexer which splits input in to tokens using shell-style rules for quoting and commenting.
src/github.com/stretchr/testify/assert
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
src/gopkg.in/alecthomas/kingpin.v2
Package kingpin provides command line interfaces like this: $ chat usage: chat [<flags>] <command> [<flags>] [<args> ...] Flags: --debug enable debug mode --help Show help.
Package kingpin provides command line interfaces like this: $ chat usage: chat [<flags>] <command> [<flags>] [<args> ...] Flags: --debug enable debug mode --help Show help.

Jump to

Keyboard shortcuts

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