mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
c28f7cb29f
Initial part of #435
24 lines
599 B
Go
24 lines
599 B
Go
package gosec
|
|
|
|
// ReportInfo this is report information
|
|
type ReportInfo struct {
|
|
Errors map[string][]Error `json:"Golang errors"`
|
|
Issues []*Issue
|
|
Stats *Metrics
|
|
GosecVersion string
|
|
}
|
|
|
|
// NewReportInfo instantiate a ReportInfo
|
|
func NewReportInfo(issues []*Issue, metrics *Metrics, errors map[string][]Error) *ReportInfo {
|
|
return &ReportInfo{
|
|
Errors: errors,
|
|
Issues: issues,
|
|
Stats: metrics,
|
|
}
|
|
}
|
|
|
|
// WithVersion defines the version of gosec used to generate the report
|
|
func (r *ReportInfo) WithVersion(version string) *ReportInfo {
|
|
r.GosecVersion = version
|
|
return r
|
|
}
|