reporter

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitBucketAnnotation

type BitBucketAnnotation struct {
	Path     string `json:"path"`
	Line     int    `json:"line"`
	Message  string `json:"message"`
	Severity string `json:"severity"`
	Type     string `json:"type"`
}

type BitBucketAnnotations

type BitBucketAnnotations struct {
	Annotations []BitBucketAnnotation `json:"annotations"`
}

type BitBucketReport

type BitBucketReport struct {
	Title  string `json:"title"`
	Result string `json:"result"`
}

type BitBucketReporter

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

BitBucketReporter send linter results to BitBucket using https://docs.atlassian.com/bitbucket-server/rest/7.8.0/bitbucket-code-insights-rest.html

func NewBitBucketReporter

func NewBitBucketReporter(uri string, timeout time.Duration, token, project, repo string, gitCmd git.CommandRunner) BitBucketReporter

func (BitBucketReporter) Submit

func (r BitBucketReporter) Submit(summary Summary) (err error)

type ConsoleReporter

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

func NewConsoleReporter

func NewConsoleReporter(output io.Writer) ConsoleReporter

func (ConsoleReporter) Submit

func (cr ConsoleReporter) Submit(summary Summary) error

type GithubReporter

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

func NewGithubReporter

func NewGithubReporter(baseURL, uploadURL string, timeout time.Duration, token, owner, repo string, prNum int, gitCmd git.CommandRunner) GithubReporter

NewGithubReporter creates a new GitHub reporter that reports problems via comments on a given pull request number (integer).

func (GithubReporter) Submit

func (gr GithubReporter) Submit(summary Summary) error

Submit submits the summary to GitHub.

type Report

type Report struct {
	Path    string
	Rule    parser.Rule
	Problem checks.Problem
}

func (Report) IsPassing

func (r Report) IsPassing() bool

type Reporter

type Reporter interface {
	Submit(Summary) error
}

type Summary

type Summary struct {
	Reports     []Report
	FileChanges discovery.FileFindResults
}

func (Summary) CountBySeverity

func (s Summary) CountBySeverity() map[checks.Severity]int

func (Summary) HasFatalProblems

func (s Summary) HasFatalProblems() bool

func (Summary) IsPassing

func (s Summary) IsPassing() bool

Jump to

Keyboard shortcuts

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