fix(ci): resolve 9 remaining staticcheck issues

- SA5011: use t.Fatal instead of t.Error before nil pointer access in
  verification handler tests (stops test execution on nil)
- SA4006: replace unused lvalues with _ in repo_test.go and team_test.go
- ST1020: fix comment format on ListViolations to match method name

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shankar0123
2026-03-27 23:20:28 -04:00
parent 09ff51c5ae
commit c617a686d6
4 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -212,7 +212,7 @@ func TestCertificateRepository_List_Filtering(t *testing.T) {
}
// Filter by environment
certs, total, err = repo.List(ctx, &repository.CertificateFilter{Environment: "production"})
_, total, err = repo.List(ctx, &repository.CertificateFilter{Environment: "production"})
if err != nil {
t.Fatalf("List with env filter failed: %v", err)
}
@@ -1102,7 +1102,7 @@ func TestDiscoveryRepository_ScanCRUD(t *testing.T) {
}
// ListScans with empty agent (all)
scans, total, err = repo.ListScans(ctx, "", 1, 10)
_, total, err = repo.ListScans(ctx, "", 1, 10)
if err != nil {
t.Fatalf("ListScans all failed: %v", err)
}
@@ -1188,7 +1188,7 @@ func TestDiscoveryRepository_DiscoveredCertCRUD(t *testing.T) {
}
// ListDiscovered
certs, total, err := repo.ListDiscovered(ctx, &repository.DiscoveryFilter{Page: 1, PerPage: 10})
_, total, err := repo.ListDiscovered(ctx, &repository.DiscoveryFilter{Page: 1, PerPage: 10})
if err != nil {
t.Fatalf("ListDiscovered failed: %v", err)
}