gometalint

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: AGPL-3.0 Imports: 15 Imported by: 0

README

Build Status lookout analyzer: gometalint

A lookout analyzer implementation that uses gometalinter.

Disclaimer: This is not an official product, but can be used to verify that your lookout installation is working.

This analyzer only enables the gometalinter checks that are file-level, and skips directory- and package-level checks. The currently-enabled linters are (from gometalint.go):

Build

make packages

will produce binaries for multiple architectures under ./build.

Dependencies

Requires stable version of gometalinter.v2 binary avabilable in PATH.

To install, do

go get -u gopkg.in/alecthomas/gometalinter.v2
gometalinter.v2 --install

This will also install a number of linter binaries, vendored by gometalinter.

Example of utilization

With lookout-sdk binary from the latest release of SDK

$ lookout-gometalint

$ lookout-sdk review --log-level=debug \
    --from c99dcdff172f1cb5505603a45d054998cb4dd606 \
    --to 3a9d78bdd1139c929903885ecb8f811931b8aa70

Configuration

Variable Default Description
GOMETALINT_HOST 0.0.0.0 IP address to bind the gRCP serve
GOMETALINT_PORT 9930 Port to bind the gRPC server
GOMETALINT_DATA_SERVICE_URL ipv4://localhost:10301 gRPC URL of the Data service
GOMETALINT_LOG_LEVEL info Logging level ("info", "debug", "warning" or "error")

License

AGPLv3, see LICENSE

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	Version    string
	DataClient pb.DataClient
	Args       []string
}

Analyzer for the lookout

func (*Analyzer) NotifyPushEvent

func (a *Analyzer) NotifyPushEvent(ctx context.Context, e *pb.PushEvent) (*pb.EventResponse, error)

func (*Analyzer) NotifyReviewEvent

func (a *Analyzer) NotifyReviewEvent(ctx context.Context, e *pb.ReviewEvent) (
	*pb.EventResponse, error)

type Comment

type Comment struct {
	// contains filtered or unexported fields
}

Comment as returned by gometalint

func RunGometalinter

func RunGometalinter(args []string) []Comment

RunGometalinter execs gometalint binary \w pre-configured set of linters

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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