-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
02e7f46
commit 3053513
Showing
16 changed files
with
28 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ linters: | |
- ginkgolinter | ||
- gofmt | ||
- goimports | ||
- govet | ||
- misspell | ||
- nakedret | ||
- unconvert | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/sh -ex | ||
|
||
GOLANGCI_VERSION="${GOLANGCI_VERSION:-v1.54.2}" | ||
GOLANGCI_VERSION="${GOLANGCI_VERSION:-v1.58.0}" | ||
|
||
go install "github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_VERSION}" | ||
|
||
golangci-lint run --timeout=16m ./... | ||
golangci-lint run --timeout=16m ./... "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import ( | |
"net/url" | ||
|
||
v1 "k8s.io/api/core/v1" | ||
|
||
"kubevirt.io/containerized-data-importer/pkg/common" | ||
) | ||
|
||
|