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

Adjust golangci-lint linters #3284

Merged
merged 6 commits into from
Dec 2, 2024
Merged

Conversation

tpantelis
Copy link
Contributor

Added new linters (some commented out if not needed) and removed deprecated linters. Also addressed violations reported by new linters (in separate commits).

Related to submariner-io/enhancements#231

Added new linters (some commented out if not needed) and removed
deprecated linters.

Related to submariner-io/enhancements#231

Signed-off-by: Tom Pantelis <[email protected]>
"Error return value of `encoding/json.MarshalIndent` is not checked"

Signed-off-by: Tom Pantelis <[email protected]>
"interface method <...> must have named param for type <...>"

Signed-off-by: Tom Pantelis <[email protected]>
- "fmt.Errorf can be replaced with errors.New"
- "fmt.Sprintf can be replaced with string concatenation"
- "fmt.Sprint can be replaced with faster strconv.FormatUint"
- "fmt.Sprintf can be replaced with faster strconv.Itoa"

Signed-off-by: Tom Pantelis <[email protected]>
"Function name: testReconciliation, Cyclomatic Complexity: 2,
 Halstead Volume: 13318.79, Maintainability Index: 14"

Refactored testReconciliation into several functions to alleviate
the complexity.

Signed-off-by: Tom Pantelis <[email protected]>
@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr3284/tpantelis/adj_linters
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

@tpantelis tpantelis requested a review from dfarrell07 November 27, 2024 19:06
@skitt skitt enabled auto-merge (rebase) November 28, 2024 17:12
@submariner-bot submariner-bot added the ready-to-test When a PR is ready for full E2E testing label Dec 2, 2024
@skitt skitt merged commit edbfda0 into submariner-io:devel Dec 2, 2024
36 checks passed
@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr3284/tpantelis/adj_linters]

@tpantelis tpantelis deleted the adj_linters branch December 10, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-test When a PR is ready for full E2E testing
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants