kubevirt / containerized-data-importer

Data Import Service for kubernetes, designed with kubevirt in mind.
Apache License 2.0
395 stars 249 forks source link

Enable intrange linter #3298

Closed EduardGomezEscandell closed 1 month ago

EduardGomezEscandell commented 1 month ago

What this PR does / why we need it: This linter ensures we use the new range-over-int construct

OLD:

    for i:=0; i<N; i++ {}

NEW:

    for i := range N {}

Often it can be simplified further:

    for range N {}

Special notes for your reviewer:

Release note:

NONE
kubevirt-bot commented 1 month ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign awels for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubevirt/containerized-data-importer/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
akalenyu commented 1 month ago

Pretty aggressive to start forcing the new style, no?

coveralls commented 1 month ago

Coverage Status

coverage: 58.496% (+0.02%) from 58.481% when pulling d626e612f4eb41a0cecc980516737f6c0e36c942 on EduardGomezEscandell:linter-intrange into 50563e2120b18b95ca484e712c800a63057f1bdd on kubevirt:main.

EduardGomezEscandell commented 1 month ago

Pretty aggressive to start forcing the new style, no?

Maybe, I guess this is just a proposal.

Feel free to reject it, this took 10 minutes so it's not like there's a big sunk cost.

kubevirt-bot commented 1 month ago

@EduardGomezEscandell: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-containerized-data-importer-e2e-hpp-latest d626e612f4eb41a0cecc980516737f6c0e36c942 link true /test pull-containerized-data-importer-e2e-hpp-latest
pull-containerized-data-importer-e2e-nfs d626e612f4eb41a0cecc980516737f6c0e36c942 link true /test pull-containerized-data-importer-e2e-nfs
pull-containerized-data-importer-e2e-ceph d626e612f4eb41a0cecc980516737f6c0e36c942 link true /test pull-containerized-data-importer-e2e-ceph
pull-containerized-data-importer-e2e-ceph-wffc d626e612f4eb41a0cecc980516737f6c0e36c942 link true /test pull-containerized-data-importer-e2e-ceph-wffc
Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
kubevirt-bot commented 1 month ago

PR needs rebase.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
EduardGomezEscandell commented 1 month ago

Closing this because I don't want to deal with all the failures, and the interest may not be there.