Skip to content

Enabled modernize linter configuration.#3399

Open
atombrella wants to merge 1 commit into
istio:masterfrom
atombrella:feature/modernize_enable
Open

Enabled modernize linter configuration.#3399
atombrella wants to merge 1 commit into
istio:masterfrom
atombrella:feature/modernize_enable

Conversation

@atombrella
Copy link
Copy Markdown

Modernize is a golang tool that contains many built-in replacements to use newer golang semantics and standard library features. The PR enables the rules that have been dealt with in the istio repository.

The entire list for GoLang 1.26 is in the documentation.
https://golangci-lint.run/docs/linters/configuration/#modernize

  • forvar. I believe it's already covered by copyloopvar, so it's easier to just enable it here.
  • rangeint (currently on its way to being enforced in istio in a PR).
  • Some strings-rules
  • slicescontains and slicessort have only been dealt with in batches. These rules are also quite neat to simplify code.

Modernize is a golang tool that contains many built-in replacements
to use newer golang semantics and standard library features. The PR
enables the rules that have been dealt with in the istio repository.
@atombrella atombrella requested a review from a team as a code owner May 27, 2026 20:33
@istio-policy-bot
Copy link
Copy Markdown

😊 Welcome @atombrella! This is either your first contribution to the Istio tools repo, or it's been
a while since you've been here.

You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines
by referring to Contributing to Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@istio-testing istio-testing added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test labels May 27, 2026
@istio-testing
Copy link
Copy Markdown
Contributor

Hi @atombrella. Thanks for your PR.

I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants