diagnostic

package
v1.8.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sort

func Sort(ds []Diagnostic)

Types

type Category

type Category uint8
const (
	CategoryCorrectness Category = iota
	CategorySuspicious
	CategoryPerformance
	CategoryMaintainability
	CategoryOpenMP
	CategoryStyle
	CategorySecurity
	CategoryPortability
	CategoryRestriction
)

func (Category) String

func (c Category) String() string

type Diagnostic

type Diagnostic struct {
	RuleID      string
	Code        string
	Severity    Severity
	Category    Category
	Message     string
	Filename    string
	Range       source.Range
	Notes       []RelatedLocation
	Suggestions []Suggestion
	Fix         *Fix
}

func (*Diagnostic) Add

func (d *Diagnostic) Add(dst *[]Diagnostic)

type Edit

type Edit struct {
	Range   source.Range
	NewText string
}

type Fix

type Fix struct {
	Description string
	Edits       []Edit
}

type RelatedLocation

type RelatedLocation struct {
	Range   source.Range
	Message string
}

type Severity

type Severity uint8
const (
	SeverityOff Severity = iota

	SeverityError

	SeverityWarning

	SeverityInfo

	SeverityHint
)

func ParseSeverity

func ParseSeverity(s string) (Severity, bool)

func (Severity) String

func (s Severity) String() string

type Suggestion

type Suggestion struct {
	Description string
	Edits       []Edit
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL