-
Notifications
You must be signed in to change notification settings - Fork 245
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
Improve usability of Golangci-lint #3193
Improve usability of Golangci-lint #3193
Conversation
Skipping CI for Draft Pull Request. |
/test all |
287130c
to
f8bf358
Compare
/test all |
f8bf358
to
f503b22
Compare
f503b22
to
4b7cb3b
Compare
/test all |
4b7cb3b
to
55bace0
Compare
/test all |
4623b1c
to
a744b6f
Compare
/retest |
/cc @mhenriks |
hack/build/run-linters.sh
Outdated
@@ -1,7 +1,7 @@ | |||
#!/bin/sh -ex | |||
|
|||
GOLANGCI_VERSION="${GOLANGCI_VERSION:-v1.54.2}" | |||
GOLANGCI_VERSION="${GOLANGCI_VERSION:-v1.57.2}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They just released 1.58
Seems like this hadn't been run in a long while. Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Golangci-lint already runs gofmt internally (see ./.golangci.yml) Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
This linter has been deprecated since May 9, 2021. Golangci-lint already covers its functionality Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Golangci-lint already runs goimports internally (see ./.golangci.yml) Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
This way we don't parse the project twice. Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
d87a064
to
1cdb8ce
Compare
/retest |
/hold |
/hold cancel |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mhenriks The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Run 'make format && make generate' Seems like this hadn't been run in a long while. Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Run 'golangci-lint --fix' when using 'make format' Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Update golangci-lint version Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Remove gofmt Golangci-lint already runs gofmt internally (see ./.golangci.yml) Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Remove golint pass This linter has been deprecated since May 9, 2021. Golangci-lint already covers its functionality Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Remove goimports Golangci-lint already runs goimports internally (see ./.golangci.yml) Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Move govet into golangci-lint This way we don't parse the project twice. Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Update README Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Run formaters and generators again Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> --------- Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
* Run bazelisk run //robots/cmd/uploader:uploader -- -workspace /home/prow/go/src/github.com/kubevirt/project-infra/../containerized-data-importer/WORKSPACE -dry-run=false (#3247) Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com> * Improve usability of Golangci-lint (#3193) * Run 'make format && make generate' Seems like this hadn't been run in a long while. Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Run 'golangci-lint --fix' when using 'make format' Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Update golangci-lint version Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Remove gofmt Golangci-lint already runs gofmt internally (see ./.golangci.yml) Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Remove golint pass This linter has been deprecated since May 9, 2021. Golangci-lint already covers its functionality Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Remove goimports Golangci-lint already runs goimports internally (see ./.golangci.yml) Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Move govet into golangci-lint This way we don't parse the project twice. Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Update README Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * Run formaters and generators again Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> --------- Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> * forklift: introduce forklift controller (#2983) * forklift: add types for forklift populators Introduce the OvirtVolumePopulator and OpenstackVolumePopulator types Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: introduce forklift controller Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: add CRD missing CRD suffix Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: fix tests Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: start support for mutated PVC Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: fix linter issues and skip bound PVCs Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: update vendor and generated code Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: remove unnecessary argument Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: add ovirt-populator to cdi-importer Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: fix linter issues Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: fix contrller_test Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: regenerate swagger Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: normalize ovirt image name Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: restore OVIRT_POPULATOR_IMAGE_NAME Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: address comments - remove accidental copy-paste - change type of NAD reference to string - use NAD in the controller Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: add doc with examples for the forklift populators Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: rename secret reference Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: fix linter warning Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: update deps Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: fix linter issues Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: use ginkgo for openstack populator test Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * Roll back nginx from 1.24.0 to 1.22.1 to avoid segfaults when pulling… … images with tls Possibly a bug, there were some segfault fixes in 1.25.4 release: https://nginx.org/en/CHANGES Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com> * forklift: address comments - Fix const - Reverse conditional - Pass context to reconcile - Improve cross namespace check - Add populator pod watcher Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: address comments - Drop unnecessary comments - Add dataSourceRef check - Add node to spec Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: add restartCount annotation - fix race condition leaving Running phase in annotation - fix metrics UT Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: address comments - Change optional fields to a pointer - Fix Pod watch - Add NotFound check to avoid an extra reconile Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> * forklift: regenerate Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> --------- Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com> Co-authored-by: Alex Kalenyuk <akalenyu@redhat.com> * Run bazelisk run //robots/cmd/uploader:uploader -- -workspace /home/prow/go/src/github.com/kubevirt/project-infra/../containerized-data-importer/WORKSPACE -dry-run=false Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com> --------- Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com> Signed-off-by: Edu Gómez Escandell <egomez@redhat.com> Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com> Co-authored-by: kubevirt-bot <kubevirtbot@redhat.com> Co-authored-by: Edu Gómez Escandell <egomez@redhat.com> Co-authored-by: Benny Zlotnik <2139890+bennyz@users.noreply.github.com>
What this PR does / why we need it:
Adds golangci-lint to the
make format
target, so it runs in a container.It also removes redundant formatters that are also bundled inside golangci-lint (gofmt, govet, goimports).
Special notes for your reviewer:
Release note: