Skip to content

Commit 57eb7f5

Browse files
committed
automated lint fixes
Signed-off-by: Jordan Keister <[email protected]>
1 parent b044ec9 commit 57eb7f5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+161
-178
lines changed

alpha/action/migrate_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ relatedImages:
291291
name: operator
292292
schema: olm.bundle
293293
`
294-
295294
}
296295

297296
func migrateBarCatalogSqlite() string {

alpha/action/migrations/migrations_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ import (
88
"testing"
99

1010
"github.com/google/go-cmp/cmp"
11+
"github.com/stretchr/testify/require"
12+
1113
"github.com/operator-framework/api/pkg/operators/v1alpha1"
14+
1215
"github.com/operator-framework/operator-registry/alpha/declcfg"
1316
"github.com/operator-framework/operator-registry/alpha/property"
14-
"github.com/stretchr/testify/require"
1517
)
1618

1719
func TestMigrations(t *testing.T) {

alpha/action/render_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func TestRender(t *testing.T) {
9090
testMigrations := migrations.Migrations{
9191
Migrations: []migrations.Migration{
9292
fauxMigration{"faux-migration", "my help text", func(d *declcfg.DeclarativeConfig) error {
93-
for i, _ := range d.Bundles {
93+
for i := range d.Bundles {
9494
d.Bundles[i].Name = fmt.Sprintf("%s-MIGRATED", d.Bundles[i].Name)
9595
}
9696
return nil

alpha/declcfg/declcfg.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import (
66
"errors"
77
"fmt"
88

9-
prettyunmarshaler "github.com/operator-framework/operator-registry/pkg/prettyunmarshaler"
10-
119
"golang.org/x/text/cases"
1210
utilerrors "k8s.io/apimachinery/pkg/util/errors"
1311
"k8s.io/apimachinery/pkg/util/sets"
1412

1513
"github.com/operator-framework/operator-registry/alpha/property"
14+
prettyunmarshaler "github.com/operator-framework/operator-registry/pkg/prettyunmarshaler"
1615
)
1716

1817
const (

alpha/declcfg/declcfg_to_model.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ func ConvertToModel(cfg DeclarativeConfig) (model.Model, error) {
178178
deprecationsByPackage := sets.New[string]()
179179

180180
for i, deprecation := range cfg.Deprecations {
181-
182181
// no need to validate schema, since it could not be unmarshaled if missing/invalid
183182

184183
if deprecation.Package == "" {

alpha/declcfg/declcfg_to_model_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,6 @@ func TestConvertToModelBundle(t *testing.T) {
484484
assert.Len(t, b.PropertiesP.BundleObjects, 2)
485485
assert.Len(t, b.PropertiesP.Packages, 1)
486486
assert.Equal(t, semver.MustParse("0.1.0"), b.Version)
487-
488487
}
489488

490489
func TestConvertToModelRoundtrip(t *testing.T) {

alpha/declcfg/load_benchmark_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ import (
1010
"testing"
1111

1212
"github.com/blang/semver/v4"
13+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
14+
1315
"github.com/operator-framework/api/pkg/lib/version"
1416
"github.com/operator-framework/api/pkg/operators/v1alpha1"
15-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1617

1718
"github.com/operator-framework/operator-registry/alpha/declcfg"
1819
"github.com/operator-framework/operator-registry/alpha/property"

alpha/property/property.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import (
77
"fmt"
88
"reflect"
99

10-
"github.com/operator-framework/api/pkg/operators/v1alpha1"
1110
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
11+
12+
"github.com/operator-framework/api/pkg/operators/v1alpha1"
1213
)
1314

1415
type Property struct {

alpha/template/converter/converter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import (
66
"io"
77
"os"
88

9+
"sigs.k8s.io/yaml"
10+
911
"github.com/operator-framework/operator-registry/alpha/template/basic"
1012
"github.com/operator-framework/operator-registry/pkg/image"
11-
"sigs.k8s.io/yaml"
1213
)
1314

1415
type Converter struct {

alpha/template/semver/semver_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,6 @@ func TestGetVersionsFromStandardChannel(t *testing.T) {
544544
require.EqualValues(t, "a", iosv.pkg) // verify that we learned the package name and stashed it in the receiver
545545
})
546546
}
547-
548547
}
549548

550549
func TestBailOnVersionBuildMetadata(t *testing.T) {
@@ -597,7 +596,6 @@ func TestBailOnVersionBuildMetadata(t *testing.T) {
597596
}
598597

599598
func TestReadFile(t *testing.T) {
600-
601599
templateFstr := `---
602600
schema: olm.semver
603601
generateMajorChannels: %s

0 commit comments

Comments
 (0)