Skip to content
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

[all] migrate from golint to golangci-lint #1853

Closed
chrigl opened this issue May 10, 2022 · 5 comments · Fixed by #1860
Closed

[all] migrate from golint to golangci-lint #1853

chrigl opened this issue May 10, 2022 · 5 comments · Fixed by #1860
Assignees
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@chrigl
Copy link
Contributor

chrigl commented May 10, 2022

Is this a BUG REPORT or FEATURE REQUEST?:

/kind feature

What happened:

We are using golint to lint the project which is deprecated.

NOTE: Golint is golang/go#38968. There's no drop-in replacement for it, but tools such as Staticcheck and go vet should be used instead.

We should migrate our linting to staticcheck.

What you expected to happen:

How to reproduce it:

Anything else we need to know?:

Environment:

  • openstack-cloud-controller-manager(or other related binary) version:
  • OpenStack version:
  • Others:
@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label May 10, 2022
@jichenjc
Copy link
Contributor

@chrigl are you working on this ?

@chrigl
Copy link
Contributor Author

chrigl commented May 12, 2022

Not started yet, but I would next week if no one picks it up until then.

@chrigl chrigl changed the title [all] migrate from golint to staticcheck [all] migrate from golint to golangci-lint May 12, 2022
@chrigl
Copy link
Contributor Author

chrigl commented May 13, 2022

/assign

@chrigl
Copy link
Contributor Author

chrigl commented May 14, 2022

Turns out...

The golint checks never run for quite a while now. In hacks/verify-golint.sh a list of files is provided by go test ... returned a wrong list. In return, golint ran against non-existing files. Unfortunately the exit code of golint in this case is still 0, and the output of stderr was redirected to /dev/null.

As a result, the code base contains a whole lot of lint failures.

@chrigl
Copy link
Contributor Author

chrigl commented May 14, 2022

/kind cleanup

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label May 14, 2022
@chrigl chrigl mentioned this issue May 24, 2022
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants