Documentation ¶
Overview ¶
Package findings contains proto definitions for code findings.
Index ¶
- Variables
- type Finding
- func (*Finding) Descriptor() ([]byte, []int)deprecated
- func (x *Finding) GetCategory() string
- func (x *Finding) GetFixes() []*Fix
- func (x *Finding) GetLocation() *Location
- func (x *Finding) GetMessage() string
- func (x *Finding) GetSeverityLevel() Finding_SeverityLevel
- func (*Finding) ProtoMessage()
- func (x *Finding) ProtoReflect() protoreflect.Message
- func (x *Finding) Reset()
- func (x *Finding) String() string
- type Finding_SeverityLevel
- func (Finding_SeverityLevel) Descriptor() protoreflect.EnumDescriptor
- func (x Finding_SeverityLevel) Enum() *Finding_SeverityLevel
- func (Finding_SeverityLevel) EnumDescriptor() ([]byte, []int)deprecated
- func (x Finding_SeverityLevel) Number() protoreflect.EnumNumber
- func (x Finding_SeverityLevel) String() string
- func (Finding_SeverityLevel) Type() protoreflect.EnumType
- type Findings
- type Fix
- type Fix_Replacement
- func (*Fix_Replacement) Descriptor() ([]byte, []int)deprecated
- func (x *Fix_Replacement) GetLocation() *Location
- func (x *Fix_Replacement) GetNewContent() string
- func (*Fix_Replacement) ProtoMessage()
- func (x *Fix_Replacement) ProtoReflect() protoreflect.Message
- func (x *Fix_Replacement) Reset()
- func (x *Fix_Replacement) String() string
- type Location
- func (*Location) Descriptor() ([]byte, []int)deprecated
- func (x *Location) GetFilePath() string
- func (x *Location) GetGerritChangeRef() *Location_GerritChangeReference
- func (x *Location) GetRange() *Location_Range
- func (m *Location) GetSource() isLocation_Source
- func (*Location) ProtoMessage()
- func (x *Location) ProtoReflect() protoreflect.Message
- func (x *Location) Reset()
- func (x *Location) String() string
- type Location_GerritChangeRef
- type Location_GerritChangeReference
- func (*Location_GerritChangeReference) Descriptor() ([]byte, []int)deprecated
- func (x *Location_GerritChangeReference) GetChange() int64
- func (x *Location_GerritChangeReference) GetHost() string
- func (x *Location_GerritChangeReference) GetPatchset() int64
- func (x *Location_GerritChangeReference) GetProject() string
- func (*Location_GerritChangeReference) ProtoMessage()
- func (x *Location_GerritChangeReference) ProtoReflect() protoreflect.Message
- func (x *Location_GerritChangeReference) Reset()
- func (x *Location_GerritChangeReference) String() string
- type Location_Range
- func (*Location_Range) Descriptor() ([]byte, []int)deprecated
- func (x *Location_Range) GetEndColumn() int32
- func (x *Location_Range) GetEndLine() int32
- func (x *Location_Range) GetStartColumn() int32
- func (x *Location_Range) GetStartLine() int32
- func (*Location_Range) ProtoMessage()
- func (x *Location_Range) ProtoReflect() protoreflect.Message
- func (x *Location_Range) Reset()
- func (x *Location_Range) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Finding_SeverityLevel_name = map[int32]string{ 0: "SEVERITY_LEVEL_UNSPECIFIED", 1: "SEVERITY_LEVEL_INFO", 2: "SEVERITY_LEVEL_WARNING", 3: "SEVERITY_LEVEL_ERROR", } Finding_SeverityLevel_value = map[string]int32{ "SEVERITY_LEVEL_UNSPECIFIED": 0, "SEVERITY_LEVEL_INFO": 1, "SEVERITY_LEVEL_WARNING": 2, "SEVERITY_LEVEL_ERROR": 3, } )
Enum value maps for Finding_SeverityLevel.
var File_go_chromium_org_luci_common_proto_findings_findings_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Finding ¶
type Finding struct { // Category of the code finding, e.g. "ClangTidy". Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` // Location of the finding in the source code. Location *Location `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` // Human-readable message describing the finding. Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // Severity level of finding. // // In Gerrit, this controls what section of the checks UI the finding is // displayed under. Currently, the ERROR level findings won't block the CL // from submission. It will once go/long-term-cider-presubmits is implemented. SeverityLevel Finding_SeverityLevel `` /* 142-byte string literal not displayed */ // Optional suggested fixes for the finding. // // If multiple fixes are present, they should be ordered by preference. Fixes []*Fix `protobuf:"bytes,5,rep,name=fixes,proto3" json:"fixes,omitempty"` // contains filtered or unexported fields }
Finding represents a code finding, which can be a bug, vulnerability, style violation, or other issue identified in code.
func (*Finding) Descriptor
deprecated
func (*Finding) GetCategory ¶
func (*Finding) GetLocation ¶
func (*Finding) GetMessage ¶
func (*Finding) GetSeverityLevel ¶
func (x *Finding) GetSeverityLevel() Finding_SeverityLevel
func (*Finding) ProtoMessage ¶
func (*Finding) ProtoMessage()
func (*Finding) ProtoReflect ¶
func (x *Finding) ProtoReflect() protoreflect.Message
type Finding_SeverityLevel ¶
type Finding_SeverityLevel int32
const ( Finding_SEVERITY_LEVEL_UNSPECIFIED Finding_SeverityLevel = 0 Finding_SEVERITY_LEVEL_INFO Finding_SeverityLevel = 1 Finding_SEVERITY_LEVEL_WARNING Finding_SeverityLevel = 2 Finding_SEVERITY_LEVEL_ERROR Finding_SeverityLevel = 3 )
func (Finding_SeverityLevel) Descriptor ¶
func (Finding_SeverityLevel) Descriptor() protoreflect.EnumDescriptor
func (Finding_SeverityLevel) Enum ¶
func (x Finding_SeverityLevel) Enum() *Finding_SeverityLevel
func (Finding_SeverityLevel) EnumDescriptor
deprecated
func (Finding_SeverityLevel) EnumDescriptor() ([]byte, []int)
Deprecated: Use Finding_SeverityLevel.Descriptor instead.
func (Finding_SeverityLevel) Number ¶
func (x Finding_SeverityLevel) Number() protoreflect.EnumNumber
func (Finding_SeverityLevel) String ¶
func (x Finding_SeverityLevel) String() string
func (Finding_SeverityLevel) Type ¶
func (Finding_SeverityLevel) Type() protoreflect.EnumType
type Findings ¶
type Findings struct { Findings []*Finding `protobuf:"bytes,1,rep,name=findings,proto3" json:"findings,omitempty"` // contains filtered or unexported fields }
Findings are a collection of findings.
func (*Findings) Descriptor
deprecated
func (*Findings) GetFindings ¶
func (*Findings) ProtoMessage ¶
func (*Findings) ProtoMessage()
func (*Findings) ProtoReflect ¶
func (x *Findings) ProtoReflect() protoreflect.Message
type Fix ¶
type Fix struct { // Optional human-readable description of the fix. Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` // Replacements to be applied to fix the finding. Replacements []*Fix_Replacement `protobuf:"bytes,2,rep,name=replacements,proto3" json:"replacements,omitempty"` // contains filtered or unexported fields }
A suggested fix for the finding.
func (*Fix) Descriptor
deprecated
func (*Fix) GetDescription ¶
func (*Fix) GetReplacements ¶
func (x *Fix) GetReplacements() []*Fix_Replacement
func (*Fix) ProtoMessage ¶
func (*Fix) ProtoMessage()
func (*Fix) ProtoReflect ¶
func (x *Fix) ProtoReflect() protoreflect.Message
type Fix_Replacement ¶
type Fix_Replacement struct { // Location of the content to be replaced. Location *Location `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` // New content to replace the old content. NewContent string `protobuf:"bytes,2,opt,name=new_content,json=newContent,proto3" json:"new_content,omitempty"` // contains filtered or unexported fields }
func (*Fix_Replacement) Descriptor
deprecated
func (*Fix_Replacement) Descriptor() ([]byte, []int)
Deprecated: Use Fix_Replacement.ProtoReflect.Descriptor instead.
func (*Fix_Replacement) GetLocation ¶
func (x *Fix_Replacement) GetLocation() *Location
func (*Fix_Replacement) GetNewContent ¶
func (x *Fix_Replacement) GetNewContent() string
func (*Fix_Replacement) ProtoMessage ¶
func (*Fix_Replacement) ProtoMessage()
func (*Fix_Replacement) ProtoReflect ¶
func (x *Fix_Replacement) ProtoReflect() protoreflect.Message
func (*Fix_Replacement) Reset ¶
func (x *Fix_Replacement) Reset()
func (*Fix_Replacement) String ¶
func (x *Fix_Replacement) String() string
type Location ¶
type Location struct { // Types that are assignable to Source: // // *Location_GerritChangeRef Source isLocation_Source `protobuf_oneof:"source"` // Path to the file where the finding is located in the source. // // For Gerrit Change, "/COMMIT_MSG" is a special file path indicating the // location is in commit message. FilePath string `protobuf:"bytes,2,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` Range *Location_Range `protobuf:"bytes,3,opt,name=range,proto3" json:"range,omitempty"` // contains filtered or unexported fields }
Location describes a location in the source code.
func (*Location) Descriptor
deprecated
func (*Location) GetFilePath ¶
func (*Location) GetGerritChangeRef ¶
func (x *Location) GetGerritChangeRef() *Location_GerritChangeReference
func (*Location) GetRange ¶
func (x *Location) GetRange() *Location_Range
func (*Location) ProtoMessage ¶
func (*Location) ProtoMessage()
func (*Location) ProtoReflect ¶
func (x *Location) ProtoReflect() protoreflect.Message
type Location_GerritChangeRef ¶
type Location_GerritChangeRef struct { // Source from a Gerrit CL. GerritChangeRef *Location_GerritChangeReference `protobuf:"bytes,1,opt,name=gerrit_change_ref,json=gerritChangeRef,proto3,oneof"` }
type Location_GerritChangeReference ¶
type Location_GerritChangeReference struct { // Gerrit hostname, e.g. "chromium-review.googlesource.com". Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // Gerrit project, e.g. "chromium/src". Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` // Change number, e.g. 12345. Change int64 `protobuf:"varint,3,opt,name=change,proto3" json:"change,omitempty"` // Patch set number, e.g. 1. Patchset int64 `protobuf:"varint,4,opt,name=patchset,proto3" json:"patchset,omitempty"` // contains filtered or unexported fields }
func (*Location_GerritChangeReference) Descriptor
deprecated
func (*Location_GerritChangeReference) Descriptor() ([]byte, []int)
Deprecated: Use Location_GerritChangeReference.ProtoReflect.Descriptor instead.
func (*Location_GerritChangeReference) GetChange ¶
func (x *Location_GerritChangeReference) GetChange() int64
func (*Location_GerritChangeReference) GetHost ¶
func (x *Location_GerritChangeReference) GetHost() string
func (*Location_GerritChangeReference) GetPatchset ¶
func (x *Location_GerritChangeReference) GetPatchset() int64
func (*Location_GerritChangeReference) GetProject ¶
func (x *Location_GerritChangeReference) GetProject() string
func (*Location_GerritChangeReference) ProtoMessage ¶
func (*Location_GerritChangeReference) ProtoMessage()
func (*Location_GerritChangeReference) ProtoReflect ¶
func (x *Location_GerritChangeReference) ProtoReflect() protoreflect.Message
func (*Location_GerritChangeReference) Reset ¶
func (x *Location_GerritChangeReference) Reset()
func (*Location_GerritChangeReference) String ¶
func (x *Location_GerritChangeReference) String() string
type Location_Range ¶
type Location_Range struct { // Start line of the range (1-based). StartLine int32 `protobuf:"varint,1,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"` // Start column of the range (0-based). StartColumn int32 `protobuf:"varint,2,opt,name=start_column,json=startColumn,proto3" json:"start_column,omitempty"` // End line of the range (1-based). EndLine int32 `protobuf:"varint,3,opt,name=end_line,json=endLine,proto3" json:"end_line,omitempty"` // End column of the range (0-based). EndColumn int32 `protobuf:"varint,4,opt,name=end_column,json=endColumn,proto3" json:"end_column,omitempty"` // contains filtered or unexported fields }
Range within the file where the finding is located.
The semantic is the same as https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#comment-range
func (*Location_Range) Descriptor
deprecated
func (*Location_Range) Descriptor() ([]byte, []int)
Deprecated: Use Location_Range.ProtoReflect.Descriptor instead.
func (*Location_Range) GetEndColumn ¶
func (x *Location_Range) GetEndColumn() int32
func (*Location_Range) GetEndLine ¶
func (x *Location_Range) GetEndLine() int32
func (*Location_Range) GetStartColumn ¶
func (x *Location_Range) GetStartColumn() int32
func (*Location_Range) GetStartLine ¶
func (x *Location_Range) GetStartLine() int32
func (*Location_Range) ProtoMessage ¶
func (*Location_Range) ProtoMessage()
func (*Location_Range) ProtoReflect ¶
func (x *Location_Range) ProtoReflect() protoreflect.Message
func (*Location_Range) Reset ¶
func (x *Location_Range) Reset()
func (*Location_Range) String ¶
func (x *Location_Range) String() string