mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-11 03:39:01 +00:00
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:
@@ -299,7 +299,7 @@ func (s *PolicyService) DeletePolicy(id string) error {
|
||||
return s.policyRepo.DeleteRule(context.Background(), id)
|
||||
}
|
||||
|
||||
// ListViolationsHandler returns policy violations with pagination (handler interface method).
|
||||
// ListViolations returns policy violations with pagination (handler interface method).
|
||||
func (s *PolicyService) ListViolations(policyID string, page, perPage int) ([]domain.PolicyViolation, int64, error) {
|
||||
if page < 1 {
|
||||
page = 1
|
||||
|
||||
@@ -136,7 +136,7 @@ func TestTeamService_List_DefaultPagination(t *testing.T) {
|
||||
}
|
||||
|
||||
// Test perPage < 1 defaults to 50
|
||||
teams, total, err = teamService.List(ctx, 1, 0)
|
||||
teams, _, err = teamService.List(ctx, 1, 0)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user