Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-v0.12] Fix golangci-lint errors for CI #1547

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/image/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ func GetOptions(ctx context.Context, imageName name.Reference, insecure bool, do
transport := http.DefaultTransport.(*http.Transport).Clone()

if insecure {
// #nosec:G402 explicitly requested by user to use insecure registry
transport.TLSClientConfig = &tls.Config{
InsecureSkipVerify: true,
InsecureSkipVerify: true, // #nosec G402 explicitly requested by user to use insecure registry
}
} else {
transport.TLSClientConfig = &tls.Config{
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/build/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func add(ctx context.Context, mgr manager.Manager, r reconcile.Reconciler, maxCo
// or BuildRunDeletion annotation does not change
return o.GetGeneration() != n.GetGeneration() || buildRunDeletionAnnotation
},
DeleteFunc: func(e event.DeleteEvent) bool {
DeleteFunc: func(_ event.DeleteEvent) bool {
// Never reconcile on deletion, there is nothing we have to do
return false
},
Expand Down
6 changes: 3 additions & 3 deletions pkg/reconciler/buildlimitcleanup/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ func add(mgr manager.Manager, r reconcile.Reconciler, maxConcurrentReconciles in
}
return false
},
DeleteFunc: func(e event.DeleteEvent) bool {
DeleteFunc: func(_ event.DeleteEvent) bool {
// Never reconcile on deletion, there is nothing we have to do
return false
},
}

predBuildRun := predicate.Funcs{
CreateFunc: func(e event.CreateEvent) bool {
CreateFunc: func(_ event.CreateEvent) bool {
// Never reconcile in case of create buildrun event
return false
},
Expand All @@ -106,7 +106,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler, maxConcurrentReconciles in
}
return false
},
DeleteFunc: func(e event.DeleteEvent) bool {
DeleteFunc: func(_ event.DeleteEvent) bool {
// Never reconcile on deletion, there is nothing we have to do
return false
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/buildrun/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler, maxConcurrentReconciles in

return false
},
DeleteFunc: func(e event.DeleteEvent) bool {
DeleteFunc: func(_ event.DeleteEvent) bool {
// Never reconcile on deletion, there is nothing we have to do
return false
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/buildrunttlcleanup/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler, maxConcurrentReconciles in

return false
},
DeleteFunc: func(e event.DeleteEvent) bool {
DeleteFunc: func(_ event.DeleteEvent) bool {
// Never reconcile on deletion, there is nothing we have to do
return false
},
Expand Down
6 changes: 2 additions & 4 deletions test/utils/v1alpha1/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ func StartBuildWebhook() *http.Server {
Transport: &http.Transport{
IdleConnTimeout: 5 * time.Second,
ResponseHeaderTimeout: 5 * time.Second,
// #nosec:G402 test code
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
InsecureSkipVerify: true, // #nosec G402
},
TLSHandshakeTimeout: 5 * time.Second,
},
Expand Down Expand Up @@ -85,9 +84,8 @@ func StopBuildWebhook(webhookServer *http.Server) {
Transport: &http.Transport{
IdleConnTimeout: 5 * time.Second,
ResponseHeaderTimeout: 5 * time.Second,
// #nosec:G402 test code
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
InsecureSkipVerify: true, // #nosec G402
},
TLSHandshakeTimeout: 5 * time.Second,
},
Expand Down
6 changes: 2 additions & 4 deletions test/utils/v1beta1/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ func StartBuildWebhook() *http.Server {
Transport: &http.Transport{
IdleConnTimeout: 5 * time.Second,
ResponseHeaderTimeout: 5 * time.Second,
// #nosec:G402 test code
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
InsecureSkipVerify: true, // #nosec G402
},
TLSHandshakeTimeout: 5 * time.Second,
},
Expand Down Expand Up @@ -85,9 +84,8 @@ func StopBuildWebhook(webhookServer *http.Server) {
Transport: &http.Transport{
IdleConnTimeout: 5 * time.Second,
ResponseHeaderTimeout: 5 * time.Second,
// #nosec:G402 test code
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
InsecureSkipVerify: true, // #nosec G402
},
TLSHandshakeTimeout: 5 * time.Second,
},
Expand Down
6 changes: 2 additions & 4 deletions test/utils/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ func StartBuildWebhook() *http.Server {
Transport: &http.Transport{
IdleConnTimeout: 5 * time.Second,
ResponseHeaderTimeout: 5 * time.Second,
// #nosec:G402 test code
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
InsecureSkipVerify: true, // #nosec G402
},
TLSHandshakeTimeout: 5 * time.Second,
},
Expand Down Expand Up @@ -85,9 +84,8 @@ func StopBuildWebhook(webhookServer *http.Server) {
Transport: &http.Transport{
IdleConnTimeout: 5 * time.Second,
ResponseHeaderTimeout: 5 * time.Second,
// #nosec:G402 test code
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
InsecureSkipVerify: true, // #nosec G402
},
TLSHandshakeTimeout: 5 * time.Second,
},
Expand Down
Loading