Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LintSARIF ¶
func LintSARIF(diags []LintDiagnostic, repoRoot string) sarifLog
LintSARIF converts lint diagnostics to a SARIF 2.1.0 log. repoRoot is used to normalise file URIs to repo-relative paths. Pass "" to use paths as-is.
Types ¶
type LintDiagnostic ¶
type LintDiagnostic struct {
File string `json:"file"`
Line int `json:"line,omitempty"`
Message string `json:"message"`
Rule string `json:"rule,omitempty"`
Tier string `json:"tier,omitempty"`
// Severity is "warning" or "info" for non-blocking findings; "" is treated as "error".
Severity string `json:"severity,omitempty"`
}
LintDiagnostic is a single sky lint finding, shared between text/JSON/SARIF output.
type LintEdit ¶
type LintEdit struct {
Range LintEditRange `json:"range"`
NewText string `json:"new_text"`
}
LintEdit is a single LSP-style text edit (0-based line/character ranges).
type LintEditRange ¶
type LintEditRange struct {
Start LintPosition `json:"start"`
End LintPosition `json:"end"`
}
LintEditRange is the half-open [Start, End) range for a LintEdit.
type LintFix ¶
type LintFix struct {
Code string `json:"code"`
File string `json:"file"`
DiagnosticIndex int `json:"diagnostic_index"`
Title string `json:"title"`
Confidence string `json:"confidence"`
Edits []LintEdit `json:"edits"`
}
LintFix is the JSON representation of a workflow.Fix, kept in the output package to avoid an import cycle (cmd -> output, output -> workflow would be circular if workflow imports output). The cmd layer converts workflow.Fix -> LintFix.
type LintFixEnvelope ¶
type LintFixEnvelope struct {
Diagnostics []LintDiagnostic `json:"diagnostics"`
Fixes []LintFix `json:"fixes"`
SkippedDueToConflict []LintFix `json:"skipped_due_to_conflict,omitempty"`
}
LintFixEnvelope is the JSON wrapper emitted when --fix is set. It replaces the bare diagnostics array so fixes can be included in the same response.
type LintPosition ¶
LintPosition is a 0-based line and character offset.