Documentation
¶
Index ¶
- func Submit(ctx context.Context, s Summary, c Commenter, showDuplicates bool) error
- type BitBucketCommentAnchor
- type BitBucketCommentAuthor
- type BitBucketCommentSeverityUpdate
- type BitBucketCommentStateUpdate
- type BitBucketPendingComment
- type BitBucketPendingCommentAnchor
- type BitBucketPullRequest
- type BitBucketPullRequestActivities
- type BitBucketPullRequestActivity
- type BitBucketPullRequestComment
- type BitBucketPullRequests
- type BitBucketRef
- type BitBucketReporter
- func (bb BitBucketReporter) CanCreate(done int) bool
- func (bb BitBucketReporter) CanDelete(ExistingComment) bool
- func (bb BitBucketReporter) Create(ctx context.Context, dst any, p PendingComment) error
- func (bb BitBucketReporter) Delete(ctx context.Context, dst any, c ExistingComment) error
- func (bb BitBucketReporter) Describe() string
- func (bb BitBucketReporter) Destinations(ctx context.Context) ([]any, error)
- func (bb BitBucketReporter) IsEqual(_ any, existing ExistingComment, pending PendingComment) bool
- func (bb BitBucketReporter) List(ctx context.Context, dst any) ([]ExistingComment, error)
- func (bb BitBucketReporter) MaxComments() int
- func (bb BitBucketReporter) Summary(ctx context.Context, dst any, s Summary, pendingComments []PendingComment, ...) error
- type CheckStyleReporter
- type CommentReporter
- type Commenter
- type ConsoleReporter
- type DisabledChecks
- type ExistingComment
- type GitLabReporter
- func (gl GitLabReporter) CanCreate(done int) bool
- func (gl GitLabReporter) CanDelete(ExistingComment) bool
- func (gl GitLabReporter) Create(ctx context.Context, dst any, comment PendingComment) error
- func (gl GitLabReporter) Delete(ctx context.Context, dst any, comment ExistingComment) error
- func (gl GitLabReporter) Describe() string
- func (gl GitLabReporter) Destinations(ctx context.Context) ([]any, error)
- func (gl GitLabReporter) IsEqual(_ any, existing ExistingComment, pending PendingComment) bool
- func (gl GitLabReporter) List(_ context.Context, dst any) ([]ExistingComment, error)
- func (gl GitLabReporter) MaxComments() int
- func (gl GitLabReporter) Summary(ctx context.Context, dst any, s Summary, pendingComments []PendingComment, ...) (err error)
- type GithubReporter
- func (gr GithubReporter) CanCreate(done int) bool
- func (gr GithubReporter) CanDelete(c ExistingComment) bool
- func (gr GithubReporter) Create(ctx context.Context, _ any, p PendingComment) error
- func (gr GithubReporter) Delete(ctx context.Context, _ any, comment ExistingComment) error
- func (gr GithubReporter) Describe() string
- func (gr GithubReporter) Destinations(_ context.Context) ([]any, error)
- func (gr GithubReporter) IsEqual(_ any, existing ExistingComment, pending PendingComment) bool
- func (gr GithubReporter) List(ctx context.Context, _ any) ([]ExistingComment, error)
- func (gr GithubReporter) MaxComments() int
- func (gr GithubReporter) Summary(ctx context.Context, _ any, s Summary, pendingComments []PendingComment, ...) error
- type JSONReport
- type JSONReporter
- type PendingComment
- type PrometheusDetails
- type Report
- type Reporter
- type Summary
- func (s Summary) CountBySeverity() map[checks.Severity]int
- func (s *Summary) Dedup()
- func (s *Summary) GetPrometheusDetails() []PrometheusDetails
- func (s Summary) HasFatalProblems() bool
- func (s *Summary) MarkCheckDisabled(prom, api string, checks []string)
- func (s *Summary) Report(reps ...Report)
- func (s Summary) Reports() (reports []Report)
- func (s Summary) ReportsPerPath() (reports [][]Report)
- func (s *Summary) SortReports()
- type TeamCityReporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BitBucketCommentAnchor ¶ added in v0.49.0
type BitBucketCommentAuthor ¶ added in v0.49.0
type BitBucketCommentAuthor struct {
Name string `json:"name"`
}
type BitBucketCommentSeverityUpdate ¶ added in v0.51.0
type BitBucketCommentStateUpdate ¶ added in v0.51.0
type BitBucketPendingComment ¶ added in v0.49.0
type BitBucketPendingComment struct {
Text string `json:"text"`
Severity string `json:"severity"`
Anchor BitBucketPendingCommentAnchor `json:"anchor"`
}
type BitBucketPendingCommentAnchor ¶ added in v0.49.0
type BitBucketPullRequest ¶ added in v0.49.0
type BitBucketPullRequest struct {
FromRef BitBucketRef `json:"fromRef"`
ToRef BitBucketRef `json:"toRef"`
ID int `json:"id"`
Open bool `json:"open"`
}
type BitBucketPullRequestActivities ¶ added in v0.49.0
type BitBucketPullRequestActivities struct {
Values []BitBucketPullRequestActivity `json:"values"`
NextPageStart int `json:"nextPageStart"`
IsLastPage bool `json:"isLastPage"`
}
type BitBucketPullRequestActivity ¶ added in v0.49.0
type BitBucketPullRequestActivity struct {
Action string `json:"action"`
CommentAction string `json:"commentAction"`
CommentAnchor BitBucketCommentAnchor `json:"commentAnchor"`
Comment BitBucketPullRequestComment `json:"comment"`
}
type BitBucketPullRequestComment ¶ added in v0.49.0
type BitBucketPullRequestComment struct {
State string `json:"state"`
Author BitBucketCommentAuthor `json:"author"`
Text string `json:"text"`
Severity string `json:"severity"`
Comments []BitBucketPullRequestComment `json:"comments"`
ID int `json:"id"`
Version int `json:"version"`
Resolved bool `json:"threadResolved"`
}
type BitBucketPullRequests ¶ added in v0.49.0
type BitBucketPullRequests struct {
Values []BitBucketPullRequest `json:"values"`
NextPageStart int `json:"nextPageStart"`
IsLastPage bool `json:"isLastPage"`
}
type BitBucketRef ¶ added in v0.49.0
type BitBucketReporter ¶
type BitBucketReporter struct {
// contains filtered or unexported fields
}
func NewBitBucketReporter ¶
func (BitBucketReporter) CanCreate ¶ added in v0.85.0
func (bb BitBucketReporter) CanCreate(done int) bool
func (BitBucketReporter) CanDelete ¶ added in v0.85.0
func (bb BitBucketReporter) CanDelete(ExistingComment) bool
func (BitBucketReporter) Create ¶ added in v0.85.0
func (bb BitBucketReporter) Create(ctx context.Context, dst any, p PendingComment) error
func (BitBucketReporter) Delete ¶ added in v0.85.0
func (bb BitBucketReporter) Delete(ctx context.Context, dst any, c ExistingComment) error
func (BitBucketReporter) Describe ¶ added in v0.85.0
func (bb BitBucketReporter) Describe() string
func (BitBucketReporter) Destinations ¶ added in v0.85.0
func (bb BitBucketReporter) Destinations(ctx context.Context) ([]any, error)
func (BitBucketReporter) IsEqual ¶ added in v0.85.0
func (bb BitBucketReporter) IsEqual(_ any, existing ExistingComment, pending PendingComment) bool
func (BitBucketReporter) List ¶ added in v0.85.0
func (bb BitBucketReporter) List(ctx context.Context, dst any) ([]ExistingComment, error)
func (BitBucketReporter) MaxComments ¶ added in v0.85.0
func (bb BitBucketReporter) MaxComments() int
func (BitBucketReporter) Summary ¶ added in v0.85.0
func (bb BitBucketReporter) Summary( ctx context.Context, dst any, s Summary, pendingComments []PendingComment, errs []error, ) error
type CheckStyleReporter ¶ added in v0.67.0
type CheckStyleReporter struct {
// contains filtered or unexported fields
}
func NewCheckStyleReporter ¶ added in v0.67.0
func NewCheckStyleReporter(output io.Writer) CheckStyleReporter
type CommentReporter ¶ added in v0.63.0
type CommentReporter struct {
// contains filtered or unexported fields
}
func NewCommentReporter ¶ added in v0.63.0
func NewCommentReporter(c Commenter, showDuplicates bool) CommentReporter
type Commenter ¶ added in v0.59.0
type Commenter interface {
Describe() string
Destinations(context.Context) ([]any, error)
Summary(context.Context, any, Summary, []PendingComment, []error) error
List(context.Context, any) ([]ExistingComment, error)
Create(context.Context, any, PendingComment) error
Delete(context.Context, any, ExistingComment) error
CanCreate(int) bool
CanDelete(ExistingComment) bool
IsEqual(any, ExistingComment, PendingComment) bool
MaxComments() int
}
type ConsoleReporter ¶
type ConsoleReporter struct {
// contains filtered or unexported fields
}
func NewConsoleReporter ¶
type DisabledChecks ¶ added in v0.70.0
type ExistingComment ¶ added in v0.63.0
type ExistingComment struct {
// contains filtered or unexported fields
}
type GitLabReporter ¶ added in v0.59.0
type GitLabReporter struct {
// contains filtered or unexported fields
}
func NewGitLabReporter ¶ added in v0.59.0
func (GitLabReporter) CanCreate ¶ added in v0.59.0
func (gl GitLabReporter) CanCreate(done int) bool
func (GitLabReporter) CanDelete ¶ added in v0.63.0
func (gl GitLabReporter) CanDelete(ExistingComment) bool
func (GitLabReporter) Create ¶ added in v0.59.0
func (gl GitLabReporter) Create(ctx context.Context, dst any, comment PendingComment) error
func (GitLabReporter) Delete ¶ added in v0.59.0
func (gl GitLabReporter) Delete(ctx context.Context, dst any, comment ExistingComment) error
func (GitLabReporter) Describe ¶ added in v0.59.0
func (gl GitLabReporter) Describe() string
func (GitLabReporter) Destinations ¶ added in v0.59.0
func (gl GitLabReporter) Destinations(ctx context.Context) ([]any, error)
func (GitLabReporter) IsEqual ¶ added in v0.59.0
func (gl GitLabReporter) IsEqual(_ any, existing ExistingComment, pending PendingComment) bool
func (GitLabReporter) List ¶ added in v0.59.0
func (gl GitLabReporter) List(_ context.Context, dst any) ([]ExistingComment, error)
func (GitLabReporter) MaxComments ¶ added in v0.84.0
func (gl GitLabReporter) MaxComments() int
func (GitLabReporter) Summary ¶ added in v0.59.0
func (gl GitLabReporter) Summary(ctx context.Context, dst any, s Summary, pendingComments []PendingComment, errs []error) (err error)
type GithubReporter ¶
type GithubReporter struct {
// contains filtered or unexported fields
}
func NewGithubReporter ¶
func NewGithubReporter( ctx context.Context, version, baseURL, uploadURL string, timeout time.Duration, token, owner, repo string, prNum, maxComments int, headCommit string, showDuplicates bool, ) (_ GithubReporter, err error)
NewGithubReporter creates a new GitHub reporter that reports problems via comments on a given pull request number (integer).
func (GithubReporter) CanCreate ¶ added in v0.63.0
func (gr GithubReporter) CanCreate(done int) bool
func (GithubReporter) CanDelete ¶ added in v0.63.0
func (gr GithubReporter) CanDelete(c ExistingComment) bool
func (GithubReporter) Create ¶ added in v0.63.0
func (gr GithubReporter) Create(ctx context.Context, _ any, p PendingComment) error
func (GithubReporter) Delete ¶ added in v0.63.0
func (gr GithubReporter) Delete(ctx context.Context, _ any, comment ExistingComment) error
func (GithubReporter) Describe ¶ added in v0.63.0
func (gr GithubReporter) Describe() string
func (GithubReporter) Destinations ¶ added in v0.63.0
func (gr GithubReporter) Destinations(_ context.Context) ([]any, error)
func (GithubReporter) IsEqual ¶ added in v0.63.0
func (gr GithubReporter) IsEqual(_ any, existing ExistingComment, pending PendingComment) bool
func (GithubReporter) List ¶ added in v0.63.0
func (gr GithubReporter) List(ctx context.Context, _ any) ([]ExistingComment, error)
func (GithubReporter) MaxComments ¶ added in v0.84.0
func (gr GithubReporter) MaxComments() int
func (GithubReporter) Summary ¶ added in v0.63.0
func (gr GithubReporter) Summary(ctx context.Context, _ any, s Summary, pendingComments []PendingComment, errs []error) error
type JSONReport ¶ added in v0.67.0
type JSONReporter ¶ added in v0.67.0
type JSONReporter struct {
// contains filtered or unexported fields
}
func NewJSONReporter ¶ added in v0.67.0
func NewJSONReporter(output io.Writer) JSONReporter
type PendingComment ¶ added in v0.63.0
type PendingComment struct {
// contains filtered or unexported fields
}
type PrometheusDetails ¶ added in v0.70.0
type PrometheusDetails struct {
Name string
DisabledChecks []DisabledChecks
}
type Report ¶
type Report struct {
Path discovery.Path
Owner string
Changes *discovery.Changes
Duplicates []*Report
Rule parser.Rule
Problem checks.Problem
IsDuplicate bool
}
func (Report) MarshalXML ¶ added in v0.67.0
type Summary ¶
type Summary struct {
OfflineChecks int64
OnlineChecks int64
Duration time.Duration
TotalEntries int
CheckedEntries int64
// contains filtered or unexported fields
}
func NewSummary ¶ added in v0.27.0
func (*Summary) GetPrometheusDetails ¶ added in v0.70.0
func (s *Summary) GetPrometheusDetails() []PrometheusDetails
func (Summary) HasFatalProblems ¶
func (*Summary) MarkCheckDisabled ¶ added in v0.70.0
func (Summary) ReportsPerPath ¶ added in v0.69.0
func (*Summary) SortReports ¶ added in v0.49.0
func (s *Summary) SortReports()
type TeamCityReporter ¶ added in v0.49.0
type TeamCityReporter struct {
// contains filtered or unexported fields
}
func NewTeamCityReporter ¶ added in v0.49.0
func NewTeamCityReporter(output io.Writer) TeamCityReporter
Click to show internal directories.
Click to hide internal directories.