Documentation
¶
Index ¶
- Constants
- func DetectDefaultReporter() string
- func DoCheckReport(result Check, reportingFormat string) error
- type Check
- type CheckResult
- type GitLabCodeQualityIssue
- type GitLabCodeQualityLines
- type GitLabCodeQualityLocation
- type JUnitTestCase
- type JUnitTestError
- type JUnitTestFailure
- type JUnitTestSuite
- type ToolConfigIgnore
Constants ¶
View Source
const ( SeverityError = "error" SeverityWarning = "warning" )
Severity constants
Variables ¶
This section is empty.
Functions ¶
func DetectDefaultReporter ¶
func DetectDefaultReporter() string
func DoCheckReport ¶
Types ¶
type Check ¶
type Check interface {
AddResult(CheckResult)
RemoveByIdentifier([]ToolConfigIgnore) Check
GetResults() []CheckResult
HasErrors() bool
}
Check interface for validation checking
type CheckResult ¶
type CheckResult struct {
// The path to the file that was checked
Path string `json:"path"`
// The line number of the issue
Line int `json:"line"`
Message string `json:"message"`
// The severity of the issue
Severity string `json:"severity"`
Identifier string `json:"identifier"`
}
CheckResult represents a validation result
type GitLabCodeQualityIssue ¶
type GitLabCodeQualityIssue struct {
Description string `json:"description"`
CheckName string `json:"check_name"`
Fingerprint string `json:"fingerprint"`
Severity string `json:"severity"`
Location GitLabCodeQualityLocation `json:"location"`
}
type GitLabCodeQualityLines ¶
type GitLabCodeQualityLines struct {
Begin int `json:"begin"`
}
type GitLabCodeQualityLocation ¶
type GitLabCodeQualityLocation struct {
Path string `json:"path"`
Lines GitLabCodeQualityLines `json:"lines"`
}
type JUnitTestCase ¶
type JUnitTestCase struct {
Name string `xml:"name,attr"`
ClassName string `xml:"classname,attr"`
Failure *JUnitTestFailure `xml:"failure,omitempty"`
Error *JUnitTestError `xml:"error,omitempty"`
}
type JUnitTestError ¶
type JUnitTestFailure ¶
type JUnitTestSuite ¶
type ToolConfigIgnore ¶
type ToolConfigIgnore struct {
Identifier string `yaml:"identifier"`
Path string `yaml:"path,omitempty"`
Message string `yaml:"message,omitempty"`
}
ToolConfigIgnore represents a configuration item to ignore during validation
func (ToolConfigIgnore) JSONSchema ¶
func (c ToolConfigIgnore) JSONSchema() *jsonschema.Schema
JSONSchema generates the JSON schema for ToolConfigIgnore
func (*ToolConfigIgnore) UnmarshalYAML ¶
func (c *ToolConfigIgnore) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements custom YAML unmarshaling for ToolConfigIgnore
Click to show internal directories.
Click to hide internal directories.