func GetFileAnnotations(
	ctx context.Context,
	parserAccessorHandler ParserAccessorHandler,
	errorsWithPos []protoparse.ErrorWithPos,
) ([]bufanalysis.FileAnnotation, error) {
	fileAnnotations := make([]bufanalysis.FileAnnotation, 0, len(errorsWithPos))
	for _, errorWithPos := range errorsWithPos {
		fileAnnotation, err := GetFileAnnotation(
			ctx,
			parserAccessorHandler,
			errorWithPos,
		)
		if err != nil {
			return nil, err
		}
		fileAnnotations = append(fileAnnotations, fileAnnotation)
	}
	return fileAnnotations, nil
}
// GetFileAnnotations gets the FileAnnotations for the ErrorWithPos errors.
GetFileAnnotations gets the FileAnnotations for the ErrorWithPos errors.
// GetFileAnnotations gets the FileAnnotations for the ErrorWithPos errors .
func GetFileAnnotations(
	ctx context.Context,
	parserAccessorHandler ParserAccessorHandler,
	errorsWithPos []protoparse.ErrorWithPos,
) ([]bufanalysis.FileAnnotation, error) {
	fileAnnotations := make([]bufanalysis.FileAnnotation, 0, len(errorsWithPos))
	for _, errorWithPos := range errorsWithPos {
		fileAnnotation, err := GetFileAnnotation(
			ctx,
			parserAccessorHandler,
			errorWithPos,
		)
		if err != nil {
			return nil, err
		}
		fileAnnotations = append(fileAnnotations, fileAnnotation)
	}
	return fileAnnotations, nil
}
func GetFileAnnotations ( ctx context . Context , parserAccessorHandler ParserAccessorHandler , errorsWithPos [ ] protoparse . ErrorWithPos , ) ( [ ] bufanalysis . FileAnnotation , error ) { fileAnnotations := make ( [ ] bufanalysis . FileAnnotation , 0 , len ( errorsWithPos ) ) for _ , errorWithPos := range errorsWithPos { fileAnnotation , err := GetFileAnnotation ( ctx , parserAccessorHandler , errorWithPos , ) if err != nil { return nil , err } fileAnnotations = append ( fileAnnotations , fileAnnotation ) } return fileAnnotations , nil }
GetFileAnnotations gets the FileAnnotations for the ErrorWithPos errors.
GetFileAnnotations gets the FileAnnotations for the ErrorWithPos errors .