Skip to content

Commit d2f1a14

Browse files
committed
fix lint errors
I am planning on squashing this later. Signed-off-by: arewm <[email protected]> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1 parent c8481f3 commit d2f1a14

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

pkg/chains/storage/oci/legacy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ func (b *Backend) uploadSignatureWithReferrers(ctx context.Context, format simpl
359359
}
360360

361361
// uploadAttestationWithReferrers uses cosign's OCI 1.1 experimental API for attestations
362-
func (b *Backend) uploadAttestationWithReferrers(ctx context.Context, attestation *intoto.Statement, signature string, storageOpts config.StorageOpts, remoteOpts ...remote.Option) error {
362+
func (b *Backend) uploadAttestationWithReferrers(ctx context.Context, attestation *intoto.Statement, signature string, _ config.StorageOpts, remoteOpts ...remote.Option) error {
363363
logger := logging.FromContext(ctx)
364364
if len(attestation.Subject) == 0 {
365365
return errors.New("no subjects in attestation")

pkg/chains/storage/oci/options.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ func (o *targetRepoOption) applySimpleStorer(s *SimpleStorer) error {
5959
}
6060

6161
// WithReferrersAPI configures the storers to use OCI 1.1 referrers API.
62+
//
63+
//nolint:ireturn // returning interface is the intended pattern for options
6264
func WithReferrersAPI(enabled bool) Option {
6365
return &referrersAPIOption{
6466
enabled: enabled,

pkg/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ const (
180180
gcsBucketKey = "storage.gcs.bucket"
181181
ociRepositoryKey = "storage.oci.repository"
182182
ociRepositoryInsecureKey = "storage.oci.repository.insecure"
183-
ociReferrersAPIKey = "storage.oci.referrers-api"
183+
ociReferrersAPIKey = "storage.oci.referrers-api" //nolint:gosec // G101: This is a config key, not hardcoded credentials
184184
docDBUrlKey = "storage.docdb.url"
185185
docDBMongoServerURLKey = "storage.docdb.mongo-server-url"
186186
docDBMongoServerURLDirKey = "storage.docdb.mongo-server-url-dir"

pkg/reconciler/filter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ limitations under the License.
1414
package reconciler
1515

1616
import (
17+
"slices"
18+
1719
v1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
1820
"knative.dev/pkg/controller"
19-
"slices"
2021
)
2122

2223
// PipelineRunInformerFilterFunc returns a filter function

0 commit comments

Comments
 (0)