-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add golangci-lint #181
Add golangci-lint #181
Conversation
After updating golang to 1.22 we have error: ``` go: download go1.22 for darwin/arm64: toolchain not available ``` golang/go#65568 Just set full version for golang to fix this issue
goland added this automatically :)
Using golangci-link makes it easier to check the code and avoid a lot of problems
First run new pipe: |
CoverItUp Report
|
Before you and/or I start fixing - please look at this too #182 |
Now I have registered a list of linters that I use in regular projects. Just because they often help me find certain errors. We can remove the bodyclose linter, as it is currently not working correctly. And we can remove predeclared, since it is not quite relevant. We can either correct other errors or ignore them. |
CoverItUp Report
|
@kevincobain2000 I think that it is possible to check. If you have any ideas about what other linters to enable or disable, you can discuss it here and now. :) If you have any comments about the selected constant names, I am ready to listen and discuss suggestions. |
CoverItUp Report
|
Thanks I ll push the new tag once you are ready. |
@kevincobain2000 Hi, I'm sorry, I was out of the access zone, I couldn't get in touch. |
No worries. Thanks. |
Using golangci-link makes it easier to check the code and avoid a lot of problems.
This is only a draft of changes so far.
First, after changing the golang version to 1.22 in the go.mod file, many utilities stopped working. According to issue, we corrected the version, specifying it more precisely. After that, everything worked as it should.
Performed adding a new pipe and configuration for golangci-lint to standardize checks.
At the current moment, we have a number of problems that I plan to fix in the current PR.
Please do not merge this changes until they are ready to go.