bufprotocompile

package
v1.44.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileAnnotationForErrorWithPos

func FileAnnotationForErrorWithPos(
	errorWithPos reporter.ErrorWithPos,
	options ...FileAnnotationOption,
) (bufanalysis.FileAnnotation, error)

FileAnnotationForErrorWithPos returns a new FileAnnotation for the ErrorWithPos.

This special-cases fs.PathErrors if there is FileInfo information. We know that if there is FileInfo information, and there is a fs.PathError, this can only happen due to import errors. Therefore, we print out a special message saying that the error is for an import.

func FileAnnotationSetForErrorsWithPos

func FileAnnotationSetForErrorsWithPos(
	errorsWithPos []reporter.ErrorWithPos,
	options ...FileAnnotationOption,
) (bufanalysis.FileAnnotationSet, error)

FileAnnotationSetForErrorWithPos returns new FileAnnotations for the ErrorsWithPos.

This special-cases fs.PathErrors if there is FileInfo information. We know that if there is FileInfo information, and there is a fs.PathError, this can only happen due to import errors. Therefore, we print out a special message saying that the error is for an import.

Types

type FileAnnotationOption

type FileAnnotationOption func(*fileAnnotationOptions)

FileAnnotationOption is an option when creating a FileAnnotation.

func WithExternalPathResolver

func WithExternalPathResolver(externalPathResolver func(path string) string) FileAnnotationOption

WithExternalPathResolver returns a new FileAnnotationOption that will map the given path to an external path.

Jump to

Keyboard shortcuts

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