mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
Fix simple mistakes identified by goreportcard.
These are primarily simplification and lint mistakes. However, minor fixes are also included and tests added where appropriate. PiperOrigin-RevId: 351425971
This commit is contained in:
committed by
gVisor bot
parent
cc5df09373
commit
0dab30d83f
@@ -84,7 +84,7 @@ func (p *FindingsPoster) Walk(paths []string) error {
|
||||
func (p *FindingsPoster) Post() error {
|
||||
// Just show results?
|
||||
if p.dryRun {
|
||||
for finding, _ := range p.findings {
|
||||
for finding := range p.findings {
|
||||
// Pretty print, so that this is useful for debugging.
|
||||
fmt.Printf("%s: (%s+%d) %s\n", finding.Category, finding.Position.Filename, finding.Position.Line, finding.Message)
|
||||
}
|
||||
@@ -114,7 +114,7 @@ func (p *FindingsPoster) Post() error {
|
||||
},
|
||||
}
|
||||
annotationLevel := "failure" // Always.
|
||||
for finding, _ := range p.findings {
|
||||
for finding := range p.findings {
|
||||
title := string(finding.Category)
|
||||
opts.Output.Annotations = append(opts.Output.Annotations, &github.CheckRunAnnotation{
|
||||
Path: &finding.Position.Filename,
|
||||
|
||||
Reference in New Issue
Block a user