Versions in this module Expand all Collapse all v1 v1.5.0 Mar 3, 2023 Changes in this version + const BugRisk + const Clarity + const CoberturaDTDDecl + const Compatibility + const Complexity + const ReportEngineEslint + const ReportTypeIssue + const Security + const SeverityBlocker + const SeverityCritical + const SeverityInfo + const SeverityMajor + const SeverityMinor + const Style + func GetPackages(profiles []*Profile) ([]*packages.Package, error) + func ReportListToJSON(r []*Report) ([]byte, error) + type Boundary struct + Count int + Norm float64 + Offset int + Start bool + type CheckStyleError struct + Column int + Line int + Message string + Severity string + Source string + type CheckStyleFile struct + Errors []*CheckStyleError + Name string + type CheckStyleResult struct + Files []*CheckStyleFile + Version string + XMLName xml.Name + type Class struct + BranchRate float32 + Complexity float32 + Filename string + LineRate float32 + Lines Lines + Methods []*Method + Name string + func (class Class) HitRate() float32 + func (class Class) NumLines() (numLines int64) + func (class Class) NumLinesWithHits() (numLinesWithHits int64) + type Coverage struct + BranchRate float32 + BranchesCovered int64 + BranchesValid int64 + Complexity float32 + LineRate float32 + LinesCovered int64 + LinesValid int64 + Packages []*Package + Sources []*Source + Timestamp int64 + Version string + XMLName xml.Name + func (cov *Coverage) ParseProfiles(profiles []*Profile, pkgMap map[string]*packages.Package, ignore *Ignore) error + func (cov Coverage) HitRate() float32 + func (cov Coverage) NumLines() (numLines int64) + func (cov Coverage) NumLinesWithHits() (numLinesWithHits int64) + type Ignore struct + Dirs *regexp.Regexp + Files *regexp.Regexp + GeneratedFiles bool + func (i *Ignore) Match(fileName string, data []byte) (ret bool) + type Line struct + Hits int64 + Number int + type Lines []*Line + func (lines *Lines) AddOrUpdateLine(lineNumber int, hits int64) + func (lines Lines) HitRate() (hitRate float32) + func (lines Lines) NumLines() int64 + func (lines Lines) NumLinesWithHits() (numLinesWithHits int64) + type Method struct + BranchRate float32 + Complexity float32 + LineRate float32 + Lines Lines + Name string + Signature string + func (method Method) HitRate() float32 + func (method Method) NumLines() int64 + func (method Method) NumLinesWithHits() int64 + type Package struct + BranchRate float32 + Classes []*Class + Complexity float32 + LineRate float32 + Name string + func (pkg Package) HitRate() float32 + func (pkg Package) NumLines() (numLines int64) + func (pkg Package) NumLinesWithHits() (numLinesWithHits int64) + type Profile struct + Blocks []ProfileBlock + FileName string + Mode string + func ParseProfiles(in io.Reader, ignore *Ignore) ([]*Profile, error) + func (p *Profile) Boundaries(src []byte) []Boundary + type ProfileBlock struct + Count int + EndCol int + EndLine int + NumStmt int + StartCol int + StartLine int + type Report struct + Categories []string + CheckName string + Content ReportContent + Description string + EngineName string + Fingerprint string + Location ReportLocation + OtherLocations []interface{} + RemediationPoints int + Severity string + Type string + func NewReportFromCheckstyle(checkstyleReport *CheckStyleError, reportType string, reportEngine string, ...) *Report + func (r *Report) ComputeFingerprint() + func (r *Report) SetCategories() + func (r *Report) SetCheckName() + func (r *Report) SetDefaults() + func (r *Report) SetSeverity(severity string) + func (r *Report) ToJSON() ([]byte, error) + type ReportContent struct + Body string + type ReportLocation struct + Path string + Positions ReportLocationPositions + type ReportLocationLines struct + Begin int + End int + type ReportLocationPositions struct + Begin ReportLocationPositionsData + End ReportLocationPositionsData + type ReportLocationPositionsData struct + Column int + Line int + type Source struct + Path string + func AppendIfUnique(sources []*Source, dir string) []*Source