project

package
v0.10.1-0...-928943b Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package project provides utility for reviewdog execution based on project config.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, conf *Config, runners map[string]bool, c reviewdog.CommentService, d reviewdog.DiffService, teeMode bool, filterMode difffilter.Mode, failOnError bool) error

Run runs reviewdog tasks based on Config.

func RunAndParse

func RunAndParse(ctx context.Context, conf *Config, runners map[string]bool, defaultLevel string, teeMode bool) (*reviewdog.ResultMap, error)

RunAndParse runs commands and parse results. Returns map of tool name to check results.

Types

type Config

type Config struct {
	Runner map[string]*Runner
}

Config represents reviewdog config.

func Parse

func Parse(yml []byte) (*Config, error)

Parse parses reviewdog config in yaml format.

type Runner

type Runner struct {
	// Runner command. (e.g. `golint ./...`)
	Cmd string
	// tool name in review comment. (e.g. `golint`)
	Name string
	// errorformat name. (e.g. `checkstyle`)
	Format string
	// errorformat. (e.g. `%f:%l:%c:%m`, `%-G%.%#`)
	Errorformat []string
	// Report Level for this runner. ("info", "warning", "error")
	Level string
}

Runner represents config for a runner.

Jump to

Keyboard shortcuts

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