Documentation ¶
Index ¶
Constants ¶
View Source
const (
// EffortMinutes effort to fix in minutes
EffortMinutes = 5
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Issue ¶
type Issue struct { EngineID string `json:"engineId"` RuleID string `json:"ruleId"` PrimaryLocation *Location `json:"primaryLocation"` Type string `json:"type"` Severity string `json:"severity"` EffortMinutes int `json:"effortMinutes"` SecondaryLocations []*Location `json:"secondaryLocations,omitempty"` }
Issue defines a sonar issue
type Location ¶
type Location struct { Message string `json:"message"` FilePath string `json:"filePath"` TextRange *TextRange `json:"textRange,omitempty"` }
Location defines a sonar issue's location
type Report ¶
type Report struct {
Issues []*Issue `json:"issues"`
}
Report defines a sonar report
func GenerateReport ¶
GenerateReport Convert a gosec report to a Sonar Report
type TextRange ¶
type TextRange struct { StartLine int `json:"startLine"` EndLine int `json:"endLine"` StartColumn int `json:"startColumn,omitempty"` EtartColumn int `json:"endColumn,omitempty"` }
TextRange defines the text range of an issue's location
func NewTextRange ¶
NewTextRange instantiate a TextRange
Click to show internal directories.
Click to hide internal directories.