bufanalysistesting

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertFileAnnotationsEqual

func AssertFileAnnotationsEqual(
	t *testing.T,
	expected []bufanalysis.FileAnnotation,
	actual []bufanalysis.FileAnnotation,
)

AssertFileAnnotationsEqual asserts that the annotations are equal minus the message.

func FileAnnotations

func FileAnnotations(
	t *testing.T,
	fileAnnotationFuncs []FileAnnotationFunc,
	externalPathResolver bufpath.ExternalPathResolver,
) []bufanalysis.FileAnnotation

FileAnnotations returns the FileAnnotations.

Types

type FileAnnotationFunc

FileAnnotationFunc is a function that creates a new FileAnnotation with a resolver.

func NewFileAnnotationFunc

func NewFileAnnotationFunc(
	rootRelFilePath string,
	rootDirPath string,
	startLine int,
	startColumn int,
	endLine int,
	endColumn int,
	typeString string,
) FileAnnotationFunc

NewFileAnnotationFunc returns a new FileAnnotationFunc.

If rootRelFilePath == "", FileRef will be nil.

func NewFileAnnotationNoLocationFunc

func NewFileAnnotationNoLocationFunc(
	rootRelFilePath string,
	rootDirPath string,
	typeString string,
) FileAnnotationFunc

NewFileAnnotationNoLocationFunc returns a new FileAnnotationFunc with no location.

If rootRelFilePath == "", FileRef will be nil.

func NewFileAnnotationNoLocationOrPathFunc

func NewFileAnnotationNoLocationOrPathFunc(typeString string) FileAnnotationFunc

NewFileAnnotationNoLocationOrPathFunc returns a new FileAnnotationFunc with no location or FileRef.

Jump to

Keyboard shortcuts

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