project

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: MIT Imports: 15 Imported by: 2

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 filter.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