From a6fad285f27a1589316640f872aeabb73429788c Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 31 Jan 2024 15:53:37 -0800 Subject: [PATCH] Lint flyteadmin, flyteplugins, and flytepropeller. Signed-off-by: Eduardo Apolinario --- flyteadmin/.golangci.yml | 4 +++- flyteadmin/auth/handlers.go | 13 +++++++------ flyteplugins/.golangci.yml | 3 +++ .../go/tasks/plugins/webapi/agent/plugin_test.go | 7 ++++--- flytepropeller/.golangci.yml | 3 +++ 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/flyteadmin/.golangci.yml b/flyteadmin/.golangci.yml index 7135275462..76977148dc 100644 --- a/flyteadmin/.golangci.yml +++ b/flyteadmin/.golangci.yml @@ -35,4 +35,6 @@ linters-settings: - default - prefix(github.com/flyteorg) skip-generated: true - +issues: + exclude: + - copylocks diff --git a/flyteadmin/auth/handlers.go b/flyteadmin/auth/handlers.go index 6a55c75880..2aa232aadc 100644 --- a/flyteadmin/auth/handlers.go +++ b/flyteadmin/auth/handlers.go @@ -8,12 +8,6 @@ import ( "strings" "time" - "github.com/flyteorg/flyte/flyteadmin/auth/interfaces" - "github.com/flyteorg/flyte/flyteadmin/pkg/common" - "github.com/flyteorg/flyte/flyteadmin/plugins" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" - "github.com/flyteorg/flyte/flytestdlib/errors" - "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils" "golang.org/x/oauth2" "google.golang.org/grpc" @@ -22,6 +16,13 @@ import ( "google.golang.org/grpc/peer" "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" + + "github.com/flyteorg/flyte/flyteadmin/auth/interfaces" + "github.com/flyteorg/flyte/flyteadmin/pkg/common" + "github.com/flyteorg/flyte/flyteadmin/plugins" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flytestdlib/errors" + "github.com/flyteorg/flyte/flytestdlib/logger" ) const ( diff --git a/flyteplugins/.golangci.yml b/flyteplugins/.golangci.yml index 7f4dbc80e8..6d13f4a3b6 100644 --- a/flyteplugins/.golangci.yml +++ b/flyteplugins/.golangci.yml @@ -38,3 +38,6 @@ linters-settings: - default - prefix(github.com/flyteorg) skip-generated: true +issues: + exclude: + - copylocks diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go index e66f46f1bc..bddea6869e 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go @@ -6,6 +6,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "golang.org/x/exp/maps" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" flyteIdl "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" flyteIdlCore "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" @@ -16,9 +20,6 @@ import ( agentMocks "github.com/flyteorg/flyte/flyteplugins/go/tasks/plugins/webapi/agent/mocks" "github.com/flyteorg/flyte/flytestdlib/config" "github.com/flyteorg/flyte/flytestdlib/promutils" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "golang.org/x/exp/maps" ) const defaultAgentEndpoint = "localhost:8000" diff --git a/flytepropeller/.golangci.yml b/flytepropeller/.golangci.yml index 7f4dbc80e8..6d13f4a3b6 100644 --- a/flytepropeller/.golangci.yml +++ b/flytepropeller/.golangci.yml @@ -38,3 +38,6 @@ linters-settings: - default - prefix(github.com/flyteorg) skip-generated: true +issues: + exclude: + - copylocks