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

Replace golint with staticcheck #204

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

samherrmann
Copy link
Contributor

@samherrmann samherrmann commented Aug 15, 2023

Issue

In my last pull request (#203), I happened to notice that there were a good number of errors in the Lint step of the CI pipeline. This observation made me wonder why all these errors existed while the pipeline still passed. What I learned is that the golint command is missing the -set_exit_status flag that would truly enforce linting rules.

Solution

One solution to the issue is to add the -set_exit_status flag in the pipeline and fix any outstanding linting issues. However, it should also be noted that golint was deprecated on May 9, 2021 and staticcheck is called out as a replacement. Therefore, the better long term solution might be to replace golint with staticcheck.

Consider this pull request as a proposal. If you'd rather stick with golint and address the errors it reports then let me know and I can take a look at that instead.

@@ -1,3 +1,4 @@
// Package generate demonstrates how to use moq with the go:generate directive.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I wrote the same description for this package and the example package. It's actually not clear to me what the difference is between these two packages.

@samherrmann samherrmann force-pushed the staticcheck branch 2 times, most recently from d1042e5 to d0a13d0 Compare August 15, 2023 01:19
@samherrmann samherrmann marked this pull request as ready for review August 15, 2023 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants