forked from openstack-k8s-operators/keystone-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR replace deprecated go-linter using revive (https://golangci-lint.run/usage/linters/#revive). We will add "ginkgolinter" in follow up patch once we merged add pre-commit job in openshift/releases. If we add "ginkgolinter" in this patch then it's causes below issue [1] ``` level=info msg="[config_reader] Config search paths: [./ /home/prow/go/src/github.com/openstack-k8s-operators/dataplane-operator /home/prow/go/src/github.com/openstack-k8s-operators /home/prow/go/src/github.com /home/prow/go/src /home/prow/go /home/prow /home /]" level=info msg="[config_reader] Used config file .golangci.yaml" level=error msg="Running error: unknown linters: 'ginkgolinter', run 'golangci-lint help linters' to see the list of supported linters" This patch also Remove fmt dependency from make tidy as per [1]: The fmt dependency cannot be run if the go.mod file needs an update: ``` $ make tidy go fmt ./... go: updates to go.mod needed; to update it: go mod tidy make: *** [Makefile:103: fmt] Error 1 ``` I have also made some changes as per the comment given here [2] [1]: openstack-k8s-operators/placement-operator#153 [2]: openstack-k8s-operators/cinder-operator#147 (comment)
- Loading branch information
Showing
4 changed files
with
25 additions
and
25 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 |
---|---|---|
@@ -1,2 +1,17 @@ | ||
linters: | ||
# Enable specific linter | ||
# https://golangci-lint.run/usage/linters/#enabled-by-default | ||
enable: | ||
- errorlint | ||
- revive | ||
- gofmt | ||
- govet | ||
linters-settings: | ||
revive: | ||
rules: | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter | ||
- name: unused-parameter | ||
severity: warning | ||
disabled: true | ||
run: | ||
timeout: 5m |
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