8000 [linting] Add usestdlibvars lint and fix errors by RottenRat · Pull Request #13540 · deckhouse/deckhouse · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[linting] Add usestdlibvars lint and fix errors #13540

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

Merged
merged 1 commit into from
May 20, 2025

Conversation

RottenRat
Copy link
Contributor
@RottenRat RottenRat commented May 20, 2025

Description

Add usestdlibvars linter and fix magic values.

Why do we need it, and what problem does it solve?

The usestdlibvars linter identifies instances where hardcodes literals can be replaced with well-defined constants from Go's standard library (e.g "GET" -> http.MethodGet).
This practice enhances code clarity, reduces the risk of errors, and aligns with Go's idiomatic standards.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: deckhouse
type: chore
summary: add usestdlibvars lint and fix errors
impact_level: low
8000

Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
@RottenRat RottenRat added this to the v1.70.0 milestone May 20, 2025
@github-actions github-actions bot added area/core Pull requests that update core modules go Pull requests that update Go code labels May 20, 2025
@RottenRat RottenRat marked this pull request as ready for review May 20, 2025 09:51
@RottenRat RottenRat linked an issue May 20, 2025 that may be closed by this pull request
2 tasks
@ldmonster ldmonster merged commit 390a8f7 into main May 20, 2025
64 of 66 checks passed
@ldmonster ldmonster deleted the add-usestdlibvars-and-fix-errors branch May 20, 2025 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Pull requests that update core modules go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[linting] Add usestdlibvars linter
2 participants
0