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

Fix linter errors in client & utils package #382

Open
praveingk opened this issue Jun 11, 2024 · 0 comments
Open

Fix linter errors in client & utils package #382

praveingk opened this issue Jun 11, 2024 · 0 comments
Labels
easy good first issue Good for newcomers
Milestone

Comments

@praveingk
Copy link
Collaborator

praveingk commented Jun 11, 2024

Steps to reproduce:

  1. Replace .golangci.yml to this version
  2. Run golangci-lint run --config=./.golangci.yaml ./pkg/ibm_plugin/...
pkg/client/client.go:37: line is 145 characters (lll)
pkg/client/client.go:59:21: ST1005: error strings should not be capitalized (stylecheck)
pkg/client/client.go:66:1: paramTypeCombine: func(url string, method string, body io.Reader) ([]byte, error) could be replaced with func(url, method string, body io.Reader) ([]byte, error) (gocritic)
pkg/client/client.go:81:24: response body must be closed (bodyclose)
pkg/client/client.go:92:1: paramTypeCombine: func(namespace string, cloud string, resourceName string) ([]*paragliderpb.PermitListRule, error) could be replaced with func(namespace, cloud, resourceName string) ([]*paragliderpb.PermitListRule, error) (gocritic)
pkg/client/client.go:110:1: paramTypeCombine: func(namespace string, cloud string, resourceName string, rules []*paragliderpb.PermitListRule) error could be replaced with func(namespace, cloud, resourceName string, rules []*paragliderpb.PermitListRule) error (gocritic)
pkg/client/client.go:127:1: paramTypeCombine: func(namespace string, cloud string, resourceName string, rules []string) error could be replaced with func(namespace, cloud, resourceName string, rules []string) error (gocritic)
pkg/client/client.go:144:1: paramTypeCombine: func(namespace string, cloud string, resourceName string, resource *paragliderpb.ResourceDescriptionString) (map[string]string, error) could be replaced with func(namespace, cloud, resourceName string, resource *paragliderpb.ResourceDescriptionString) (map[string]string, error) (gocritic)
pkg/client/client.go:250:1: paramTypeCombine: func(tag string, member string) error could be replaced with func(tag, member string) error (gocritic)
pkg/utils/utils.go:115: line is 136 characters (lll)
pkg/utils/utils.go:117: line is 176 characters (lll)
pkg/utils/utils.go:128:3: unlabelStmt: label out is redundant (gocritic)
12 issues:
* bodyclose: 1
* gocritic: 7
* lll: 3
* stylecheck: 1
@praveingk praveingk added this to the vNext milestone Jun 11, 2024
@praveingk praveingk changed the title Fix linter errors in client package Fix linter errors in client & utils package Jun 11, 2024
@divega divega added good first issue Good for newcomers easy labels Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants