MCPcopy Create free account
hub / github.com/bufbuild/buf / newExternalFileAnnotation

Function newExternalFileAnnotation

private/bufpkg/bufanalysis/print.go:308–324  ·  view source on GitHub ↗
(f FileAnnotation)

Source from the content-addressed store, hash-verified

306}
307
308func newExternalFileAnnotation(f FileAnnotation) externalFileAnnotation {
309 path := ""
310 if f.FileInfo() != nil {
311 path = f.FileInfo().ExternalPath()
312 }
313 return externalFileAnnotation{
314 Path: path,
315 StartLine: atLeast1(f.StartLine()),
316 StartColumn: atLeast1(f.StartColumn()),
317 EndLine: atLeast1(f.EndLine()),
318 EndColumn: atLeast1(f.EndColumn()),
319 Type: f.Type(),
320 Message: f.Message(),
321 Plugin: f.PluginName(),
322 Policy: f.PolicyName(),
323 }
324}
325
326// externalGitLabCodeQualityIssue represents the GitLab Code Quality Report Issue structure
327// expected for the GitLab Code Quality Report output.

Callers 1

Calls 11

atLeast1Function · 0.85
FileInfoMethod · 0.65
ExternalPathMethod · 0.65
StartLineMethod · 0.65
StartColumnMethod · 0.65
EndLineMethod · 0.65
EndColumnMethod · 0.65
TypeMethod · 0.65
MessageMethod · 0.65
PluginNameMethod · 0.65
PolicyNameMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…