From 87565a0bcce7087114798c3a32877894c8a9dcee Mon Sep 17 00:00:00 2001 From: Milap Jhumkhawala Date: Wed, 30 Oct 2024 05:49:44 -0500 Subject: [PATCH] fix: [Bug] Make lint command is not working (#1282) * fix: [Bug] Make lint command is not working Signed-off-by: Milap Jhumkhawala * forgot to sign commit Signed-off-by: Milap Jhumkhawala --------- Signed-off-by: Milap Jhumkhawala --- Makefile | 2 +- pkg/ai/azureopenai.go | 2 +- pkg/ai/openai.go | 2 +- pkg/custom/client.go | 1 + pkg/server/server.go | 3 ++- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9f0e013..3955ae4 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ vet: ## lint: Run go lint against code. .PHONY: lint lint: - @golangci-lint run -v ./... + @golangci-lint run -v --timeout=5m ./... ## style: Code style -> fmt,vet,lint .PHONY: style diff --git a/pkg/ai/azureopenai.go b/pkg/ai/azureopenai.go index 292bfbd..61cb12f 100644 --- a/pkg/ai/azureopenai.go +++ b/pkg/ai/azureopenai.go @@ -17,7 +17,7 @@ type AzureAIClient struct { client *openai.Client model string temperature float32 - organizationId string + // organizationId string } func (c *AzureAIClient) Configure(config IAIConfig) error { diff --git a/pkg/ai/openai.go b/pkg/ai/openai.go index 727d39e..a4bb42a 100644 --- a/pkg/ai/openai.go +++ b/pkg/ai/openai.go @@ -31,7 +31,7 @@ type OpenAIClient struct { model string temperature float32 topP float32 - organizationId string + // organizationId string } const ( diff --git a/pkg/custom/client.go b/pkg/custom/client.go index c95cd76..8829f07 100644 --- a/pkg/custom/client.go +++ b/pkg/custom/client.go @@ -17,6 +17,7 @@ type Client struct { func NewClient(c Connection) (*Client, error) { + //nolint:staticcheck // Ignoring SA1019 for compatibility reasons conn, err := grpc.Dial(fmt.Sprintf("%s:%s", c.Url, c.Port), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { diff --git a/pkg/server/server.go b/pkg/server/server.go index c20facc..b30cc50 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -26,8 +26,9 @@ import ( "net/http" "strings" "time" - + //nolint:staticcheck // Ignoring SA1019 for compatibility reasons gw2 "buf.build/gen/go/k8sgpt-ai/k8sgpt/grpc-ecosystem/gateway/v2/schema/v1/server_analyzer_service/schemav1gateway" + //nolint:staticcheck // Ignoring SA1019 for compatibility reasons gw "buf.build/gen/go/k8sgpt-ai/k8sgpt/grpc-ecosystem/gateway/v2/schema/v1/server_config_service/schemav1gateway" rpc "buf.build/gen/go/k8sgpt-ai/k8sgpt/grpc/go/schema/v1/schemav1grpc" "github.com/go-logr/zapr"