Skip to content

Commit

Permalink
chore: update alias across code base and set in golint (opendatahub-i…
Browse files Browse the repository at this point in the history
…o#1193)

* chore: update alias across code base and set in golint

Signed-off-by: Wen Zhou <[email protected]>

* Apply suggestions from code review

Co-authored-by: Bartosz Majsak <[email protected]>

* fix: more linter rename

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Bartosz Majsak <[email protected]>
  • Loading branch information
zdtsw and bartoszmajsak authored Aug 22, 2024
1 parent 03c1abc commit f6ec255
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ linters-settings:
alias: $1$2
- pkg: github.com/openshift/api/(\w+)/(v[\w\d]+)
alias: $1$2
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/controllers/datasciencecluster
alias: dscctrl
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization
alias: dscictrl
ireturn:
allow:
# defaults https://golangci-lint.run/usage/linters/#ireturn
Expand Down
4 changes: 2 additions & 2 deletions controllers/dscinitialization/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import (

dscv1 "github.com/opendatahub-io/opendatahub-operator/v2/apis/datasciencecluster/v1"
dsciv1 "github.com/opendatahub-io/opendatahub-operator/v2/apis/dscinitialization/v1"
dsci "github.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization"
dscictrl "github.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization"
"github.com/opendatahub-io/opendatahub-operator/v2/tests/envtestutil"

. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -134,7 +134,7 @@ var _ = BeforeSuite(func() {

Expect(err).NotTo(HaveOccurred())

err = (&dsci.DSCInitializationReconciler{
err = (&dscictrl.DSCInitializationReconciler{
Client: k8sClient,
Scheme: testScheme,
Log: ctrl.Log.WithName("controllers").WithName("DSCInitialization"),
Expand Down
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ import (
dsciv1 "github.com/opendatahub-io/opendatahub-operator/v2/apis/dscinitialization/v1"
featurev1 "github.com/opendatahub-io/opendatahub-operator/v2/apis/features/v1"
"github.com/opendatahub-io/opendatahub-operator/v2/controllers/certconfigmapgenerator"
dsccontr "github.com/opendatahub-io/opendatahub-operator/v2/controllers/datasciencecluster"
dscicontr "github.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization"
dscctrl "github.com/opendatahub-io/opendatahub-operator/v2/controllers/datasciencecluster"
dscictrl "github.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization"
"github.com/opendatahub-io/opendatahub-operator/v2/controllers/secretgenerator"
"github.com/opendatahub-io/opendatahub-operator/v2/controllers/webhook"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/cluster"
Expand Down Expand Up @@ -158,7 +158,7 @@ func main() { //nolint:funlen
Decoder: admission.NewDecoder(mgr.GetScheme()),
}).SetupWithManager(mgr)

if err = (&dscicontr.DSCInitializationReconciler{
if err = (&dscictrl.DSCInitializationReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Log: logger.LogWithLevel(ctrl.Log.WithName(operatorName).WithName("controllers").WithName("DSCInitialization"), logmode),
Expand All @@ -169,11 +169,11 @@ func main() { //nolint:funlen
os.Exit(1)
}

if err = (&dsccontr.DataScienceClusterReconciler{
if err = (&dscctrl.DataScienceClusterReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Log: logger.LogWithLevel(ctrl.Log.WithName(operatorName).WithName("controllers").WithName("DataScienceCluster"), logmode),
DataScienceCluster: &dsccontr.DataScienceClusterConfig{
DataScienceCluster: &dscctrl.DataScienceClusterConfig{
DSCISpec: &dsciv1.DSCInitializationSpec{
ApplicationsNamespace: dscApplicationsNamespace,
},
Expand Down

0 comments on commit f6ec255

Please sign in to comment.