Documentation ¶
Index ¶
- Variables
- type Code
- type Diagnostic
- func (*Diagnostic) Descriptor() ([]byte, []int)deprecated
- func (x *Diagnostic) GetCode() *Code
- func (x *Diagnostic) GetLocation() *Location
- func (x *Diagnostic) GetMessage() string
- func (x *Diagnostic) GetOriginalOutput() string
- func (x *Diagnostic) GetSeverity() Severity
- func (x *Diagnostic) GetSource() *Source
- func (x *Diagnostic) GetSuggestions() []*Suggestion
- func (*Diagnostic) ProtoMessage()
- func (x *Diagnostic) ProtoReflect() protoreflect.Message
- func (x *Diagnostic) Reset()
- func (x *Diagnostic) String() string
- type DiagnosticResult
- func (*DiagnosticResult) Descriptor() ([]byte, []int)deprecated
- func (x *DiagnosticResult) GetDiagnostics() []*Diagnostic
- func (x *DiagnosticResult) GetSeverity() Severity
- func (x *DiagnosticResult) GetSource() *Source
- func (*DiagnosticResult) ProtoMessage()
- func (x *DiagnosticResult) ProtoReflect() protoreflect.Message
- func (x *DiagnosticResult) Reset()
- func (x *DiagnosticResult) String() string
- type Location
- type Position
- type Range
- type Severity
- type Source
- type Suggestion
Constants ¶
This section is empty.
Variables ¶
var ( Severity_name = map[int32]string{ 0: "UNKNOWN_SEVERITY", 1: "ERROR", 2: "WARNING", 3: "INFO", } Severity_value = map[string]int32{ "UNKNOWN_SEVERITY": 0, "ERROR": 1, "WARNING": 2, "INFO": 3, } )
Enum value maps for Severity.
var File_reviewdog_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Code ¶
type Code struct { // This rule's code/identifier. Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // A URL to open with more information about this rule code. // Optional. Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*Code) Descriptor
deprecated
func (*Code) ProtoMessage ¶
func (*Code) ProtoMessage()
func (*Code) ProtoReflect ¶
func (x *Code) ProtoReflect() protoreflect.Message
type Diagnostic ¶
type Diagnostic struct { // The diagnostic's message. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // Location at which this diagnostic message applies. Location *Location `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` // This diagnostic's severity. // Optional. Severity Severity `protobuf:"varint,3,opt,name=severity,proto3,enum=reviewdog.rdf.Severity" json:"severity,omitempty"` // The source of this diagnostic, e.g. 'typescript' or 'super lint'. // Optional. Source *Source `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` // This diagnostic's rule code. // Optional. Code *Code `protobuf:"bytes,5,opt,name=code,proto3" json:"code,omitempty"` // Suggested fixes to resolve this diagnostic. // Optional. Suggestions []*Suggestion `protobuf:"bytes,6,rep,name=suggestions,proto3" json:"suggestions,omitempty"` // Experimental: If this diagnostic is converted from other formats, // original_output represents the original output which corresponds to this // diagnostic. // Optional. OriginalOutput string `protobuf:"bytes,7,opt,name=original_output,json=originalOutput,proto3" json:"original_output,omitempty"` // contains filtered or unexported fields }
Represents a diagnostic, such as a compiler error or warning. It's intended to be used as structured format which represents a diagnostic and can be used as stream of input/output such as jsonl. This message should be self-contained to report a diagnostic.
func (*Diagnostic) Descriptor
deprecated
func (*Diagnostic) Descriptor() ([]byte, []int)
Deprecated: Use Diagnostic.ProtoReflect.Descriptor instead.
func (*Diagnostic) GetCode ¶
func (x *Diagnostic) GetCode() *Code
func (*Diagnostic) GetLocation ¶
func (x *Diagnostic) GetLocation() *Location
func (*Diagnostic) GetMessage ¶
func (x *Diagnostic) GetMessage() string
func (*Diagnostic) GetOriginalOutput ¶
func (x *Diagnostic) GetOriginalOutput() string
func (*Diagnostic) GetSeverity ¶
func (x *Diagnostic) GetSeverity() Severity
func (*Diagnostic) GetSource ¶
func (x *Diagnostic) GetSource() *Source
func (*Diagnostic) GetSuggestions ¶
func (x *Diagnostic) GetSuggestions() []*Suggestion
func (*Diagnostic) ProtoMessage ¶
func (*Diagnostic) ProtoMessage()
func (*Diagnostic) ProtoReflect ¶
func (x *Diagnostic) ProtoReflect() protoreflect.Message
func (*Diagnostic) Reset ¶
func (x *Diagnostic) Reset()
func (*Diagnostic) String ¶
func (x *Diagnostic) String() string
type DiagnosticResult ¶
type DiagnosticResult struct { Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` // The source of diagnostics, e.g. 'typescript' or 'super lint'. // Optional. Source *Source `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` // This diagnostics' overall severity. // Optional. Severity Severity `protobuf:"varint,3,opt,name=severity,proto3,enum=reviewdog.rdf.Severity" json:"severity,omitempty"` // contains filtered or unexported fields }
Result of diagnostic tool such as a compiler or a linter. It's intended to be used as top-level structured format which represents a whole result of a diagnostic tool.
func (*DiagnosticResult) Descriptor
deprecated
func (*DiagnosticResult) Descriptor() ([]byte, []int)
Deprecated: Use DiagnosticResult.ProtoReflect.Descriptor instead.
func (*DiagnosticResult) GetDiagnostics ¶
func (x *DiagnosticResult) GetDiagnostics() []*Diagnostic
func (*DiagnosticResult) GetSeverity ¶
func (x *DiagnosticResult) GetSeverity() Severity
func (*DiagnosticResult) GetSource ¶
func (x *DiagnosticResult) GetSource() *Source
func (*DiagnosticResult) ProtoMessage ¶
func (*DiagnosticResult) ProtoMessage()
func (*DiagnosticResult) ProtoReflect ¶
func (x *DiagnosticResult) ProtoReflect() protoreflect.Message
func (*DiagnosticResult) Reset ¶
func (x *DiagnosticResult) Reset()
func (*DiagnosticResult) String ¶
func (x *DiagnosticResult) String() string
type Location ¶
type Location struct { // File path. It could be either absolute path or relative path. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // Range in the file path. // Optional. Range *Range `protobuf:"bytes,3,opt,name=range,proto3" json:"range,omitempty"` // contains filtered or unexported fields }
func (*Location) Descriptor
deprecated
func (*Location) ProtoMessage ¶
func (*Location) ProtoMessage()
func (*Location) ProtoReflect ¶
func (x *Location) ProtoReflect() protoreflect.Message
type Position ¶
type Position struct { // Line number, starting at 1. // Optional. Line int32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"` // Column number, starting at 1 (byte count in UTF-8). // Example: 'a𐐀b' // The column of a: 1 // The column of 𐐀: 2 // The column of b: 6 since 𐐀 is represented with 4 bytes in UTF-8. // Optional. Column int32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"` // contains filtered or unexported fields }
func (*Position) Descriptor
deprecated
func (*Position) ProtoMessage ¶
func (*Position) ProtoMessage()
func (*Position) ProtoReflect ¶
func (x *Position) ProtoReflect() protoreflect.Message
type Range ¶
type Range struct { // Required. Start *Position `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` // end can be omitted. Then the range is handled as zero-length (start == end). // Optional. End *Position `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` // contains filtered or unexported fields }
start: { line: 2, column: 1 } end: { line: 2, column: 4 }
=> "abc" (without line-break)
func (*Range) Descriptor
deprecated
func (*Range) ProtoMessage ¶
func (*Range) ProtoMessage()
func (*Range) ProtoReflect ¶
func (x *Range) ProtoReflect() protoreflect.Message
type Severity ¶
type Severity int32
func (Severity) Descriptor ¶
func (Severity) Descriptor() protoreflect.EnumDescriptor
func (Severity) EnumDescriptor
deprecated
func (Severity) Number ¶
func (x Severity) Number() protoreflect.EnumNumber
func (Severity) Type ¶
func (Severity) Type() protoreflect.EnumType
type Source ¶
type Source struct { // A human-readable string describing the source of diagnostics, e.g. // 'typescript' or 'super lint'. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // URL to this source. // Optional. Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*Source) Descriptor
deprecated
func (*Source) ProtoMessage ¶
func (*Source) ProtoMessage()
func (*Source) ProtoReflect ¶
func (x *Source) ProtoReflect() protoreflect.Message
type Suggestion ¶
type Suggestion struct { // Range at which this suggestion applies. // To insert text into a document create a range where start == end. Range *Range `protobuf:"bytes,1,opt,name=range,proto3" json:"range,omitempty"` // A suggested text which replace the range. // For delete operations use an empty string. Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
Suggestion represents a suggested text manipulation to resolve a diagnostic problem.
Insert example ('hayabusa' -> 'haya15busa'):
range { start { line: 1 column: 5 } end { line: 1 column: 5 } } text: 15
|h|a|y|a|b|u|s|a| 1 2 3 4 5 6 7 8 9
^--- insert '15'
Update example ('haya15busa' -> 'haya14busa'):
range { start { line: 1 column: 5 } end { line: 1 column: 7 } } text: 14
|h|a|y|a|1|5|b|u|s|a| 1 2 3 4 5 6 7 8 9 0 1
^---^ replace with '14'
func (*Suggestion) Descriptor
deprecated
func (*Suggestion) Descriptor() ([]byte, []int)
Deprecated: Use Suggestion.ProtoReflect.Descriptor instead.
func (*Suggestion) GetRange ¶
func (x *Suggestion) GetRange() *Range
func (*Suggestion) GetText ¶
func (x *Suggestion) GetText() string
func (*Suggestion) ProtoMessage ¶
func (*Suggestion) ProtoMessage()
func (*Suggestion) ProtoReflect ¶
func (x *Suggestion) ProtoReflect() protoreflect.Message
func (*Suggestion) Reset ¶
func (x *Suggestion) Reset()
func (*Suggestion) String ¶
func (x *Suggestion) String() string