Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PerformLinting ¶
func PerformLinting(repoDir string, pkg *g2.PackageData) []string
func RegisterLintRule ¶
func RegisterLintRule(rule LintRule)
func RegisterRuleMetadata ¶ added in v0.0.34
func RegisterRuleMetadata(meta RuleMetadata)
Types ¶
type LintResult ¶ added in v0.0.34
type LintResult struct {
RuleMetadata RuleMetadata `json:"rule"`
Message string `json:"message"`
Package string `json:"package,omitempty"`
File string `json:"file,omitempty"`
Line int `json:"line,omitempty"`
}
func PerformLintingResults ¶ added in v0.0.34
func PerformLintingResults(repoDir string, pkg *g2.PackageData) []LintResult
func (LintResult) String ¶ added in v0.0.34
func (lr LintResult) String() string
type LintRule ¶
type LintRule interface {
Lint(repoDir string, pkg *g2.PackageData) []LintResult
}
type MetadataAwareLintRule ¶ added in v0.0.34
type MetadataAwareLintRule interface {
LintRule
Metadata() RuleMetadata
}
type QAAwareLintRule ¶
type QAAwareLintRule interface {
LintWithQA(repoDir string, pkg *g2.PackageData, qa *g2.QAPolicy) []LintResult
}
type RuleMetadata ¶ added in v0.0.34
type RuleMetadata struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
URL string `json:"url,omitempty"`
Severity Severity `json:"severity"`
Source Source `json:"source"`
Tags []string `json:"tags,omitempty"`
}
func GetAllRules ¶ added in v0.0.34
func GetAllRules() []RuleMetadata
Click to show internal directories.
Click to hide internal directories.