chore: fix dependabot alerts (#3070)

* chore: fix dependabot alerts

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

* ci: fix linter config

* fix: linter fixes

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
This commit is contained in:
Ramkumar Chinchani
2025-04-04 00:31:02 -07:00
committed by GitHub
parent cb9b82823a
commit fd761c0254
20 changed files with 310 additions and 285 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ import (
type errReader int
func (errReader) Read(p []byte) (int, error) {
return 0, errors.New("test error") //nolint:goerr113
return 0, errors.New("test error") //nolint:err113
}
func TestSignatureHandlers(t *testing.T) {
+1 -1
View File
@@ -448,7 +448,7 @@ func (ms *metricServer) HistogramObserve(hv *HistogramValue) {
}
}
//nolint:goerr113
//nolint:err113
func sanityChecks(name string, knownLabels []string, found bool, labelNames, labelValues []string) error {
if !found {
return fmt.Errorf("metric %s: not found", name)
+1 -1
View File
@@ -1,11 +1,11 @@
package model
import (
"slices"
"strings"
"time"
godigest "github.com/opencontainers/go-digest"
"golang.org/x/exp/slices"
)
type ImageCVESummary struct {
+1 -1
View File
@@ -572,6 +572,6 @@ func TestScanGeneratorWithRealData(t *testing.T) {
So(err, ShouldBeNil)
So(cveSummary.Count, ShouldBeGreaterThanOrEqualTo, 5)
// As of September 22 the max severity is MEDIUM, but new CVEs could appear in the future
So([]string{"MEDIUM", "HIGH", "CRITICAL"}, ShouldContain, cveSummary.MaxSeverity)
So([]string{"MEDIUM", "HIGH", "CRITICAL", "UNKNOWN"}, ShouldContain, cveSummary.MaxSeverity)
})
}
+1 -1
View File
@@ -209,7 +209,7 @@ func (httpClient *Client) MakeGetRequest(ctx context.Context, resultPtr interfac
}
if resp.StatusCode != http.StatusOK {
return nil, nil, resp.StatusCode, errors.New(string(body)) //nolint:goerr113
return nil, nil, resp.StatusCode, errors.New(string(body)) //nolint:err113
}
// read blob