findings

package
v0.0.0-...-0e561e0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package findings contains proto definitions for code findings.

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Finding.ProtoReflect.Descriptor instead.

func (*Finding) GetCategory

func (x *Finding) GetCategory() string

func (*Finding) GetFixes

func (x *Finding) GetFixes() []*Fix

func (*Finding) GetLocation

func (x *Finding) GetLocation() *Location

func (*Finding) GetMessage

func (x *Finding) GetMessage() string

func (*Finding) GetSeverityLevel

func (x *Finding) GetSeverityLevel() Finding_SeverityLevel

func (*Finding) ProtoMessage

func (*Finding) ProtoMessage()

func (*Finding) ProtoReflect

func (x *Finding) ProtoReflect() protoreflect.Message

func (*Finding) Reset

func (x *Finding) Reset()

func (*Finding) String

func (x *Finding) String() string

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) Enum

func (Finding_SeverityLevel) EnumDescriptor deprecated

func (Finding_SeverityLevel) EnumDescriptor() ([]byte, []int)

Deprecated: Use Finding_SeverityLevel.Descriptor instead.

func (Finding_SeverityLevel) Number

func (Finding_SeverityLevel) String

func (x Finding_SeverityLevel) String() string

func (Finding_SeverityLevel) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Findings.ProtoReflect.Descriptor instead.

func (*Findings) GetFindings

func (x *Findings) GetFindings() []*Finding

func (*Findings) ProtoMessage

func (*Findings) ProtoMessage()

func (*Findings) ProtoReflect

func (x *Findings) ProtoReflect() protoreflect.Message

func (*Findings) Reset

func (x *Findings) Reset()

func (*Findings) String

func (x *Findings) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Fix.ProtoReflect.Descriptor instead.

func (*Fix) GetDescription

func (x *Fix) GetDescription() string

func (*Fix) GetReplacements

func (x *Fix) GetReplacements() []*Fix_Replacement

func (*Fix) ProtoMessage

func (*Fix) ProtoMessage()

func (*Fix) ProtoReflect

func (x *Fix) ProtoReflect() protoreflect.Message

func (*Fix) Reset

func (x *Fix) Reset()

func (*Fix) String

func (x *Fix) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Location.ProtoReflect.Descriptor instead.

func (*Location) GetFilePath

func (x *Location) GetFilePath() string

func (*Location) GetGerritChangeRef

func (x *Location) GetGerritChangeRef() *Location_GerritChangeReference

func (*Location) GetRange

func (x *Location) GetRange() *Location_Range

func (*Location) GetSource

func (m *Location) GetSource() isLocation_Source

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

func (*Location) ProtoReflect

func (x *Location) ProtoReflect() protoreflect.Message

func (*Location) Reset

func (x *Location) Reset()

func (*Location) String

func (x *Location) String() string

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 (*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 (*Location_GerritChangeReference) Reset

func (x *Location_GerritChangeReference) Reset()

func (*Location_GerritChangeReference) 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

Jump to

Keyboard shortcuts

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