gometalint

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: AGPL-3.0 Imports: 11 Imported by: 0

README

Build Status lookout analyzer: gometalint

A lookout analyzer implementation that uses gometalinter.

It only applies 6 checks from gometalinter that are file-level, and skips dir and package level ones.

Disclamer: this is not official product, but only serves the purpose of testing the lookout.

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 binary from the latest release of SDK

$ lookout-gometalint

$ lookout review -v ipv4://localhost:2001 \
    --from c99dcdff172f1cb5505603a45d054998cb4dd606 \
    --to 3a9d78bdd1139c929903885ecb8f811931b8aa70

Configuration

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

Development

SDK update

To update lookout SDK to the latest version do

wget https://github.com/src-d/lookout/releases/download/v0.x.x/lookout_sdk_v0.x.x._<os>_<arg>.tar.gz
tar xvf lookout_sdk_*.tar.gz
mv lookout_sdk_*/sdk .
mv lookout_sdk_*/lookout .

Licens

AGPLv3

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 *lookout.DataClient
	Args       []string
}

Analyzer for the lookout

func (*Analyzer) NotifyPushEvent

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

func (*Analyzer) NotifyReviewEvent

func (a *Analyzer) NotifyReviewEvent(ctx context.Context, e *lookout.ReviewEvent) (
	*lookout.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
util

Jump to

Keyboard shortcuts

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