Enabled modernize linter configuration.#3399
Conversation
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.
|
😊 Welcome @atombrella! This is either your first contribution to the Istio tools repo, or it's been You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines Thanks for contributing! Courtesy of your friendly welcome wagon. |
|
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 Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
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).slicescontainsandslicessorthave only been dealt with in batches. These rules are also quite neat to simplify code.