mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
18 lines
647 B
Diff
18 lines
647 B
Diff
|
diff --git a/go/tools/builders/nogo_main.go b/go/tools/builders/nogo_main.go
|
||
|
index 767aa3b5..fbd13082 100644
|
||
|
--- a/go/tools/builders/nogo_main.go
|
||
|
+++ b/go/tools/builders/nogo_main.go
|
||
|
@@ -386,7 +386,11 @@ func checkAnalysisResults(actions []*action, pkg *goPackage) string {
|
||
|
}
|
||
|
// Discard diagnostics based on the analyzer configuration.
|
||
|
for _, d := range act.diagnostics {
|
||
|
- filename := pkg.fset.File(d.Pos).Name()
|
||
|
+ file := pkg.fset.File(d.Pos)
|
||
|
+ if file == nil {
|
||
|
+ continue
|
||
|
+ }
|
||
|
+ filename := file.Name()
|
||
|
include := true
|
||
|
if len(config.onlyFiles) > 0 {
|
||
|
// This analyzer emits diagnostics for only a set of files.
|