-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Tracking issue: Updating golangci-lint #17596
Comments
- Partially resoles go-gitea#17596 - Resolves SA4023 errors. - Ensure correctly that typed interface are nil.
- Partially resolves go-gitea#17596 - Resolve errors from go-critic `offBy1: Index() can return -1; maybe you wanted to do Index()+1`.
- Partialy resolvess go-gitea#17596 - Resolves `badCall` errors from go-critic `badCall: suspicious Join on 1 argument` - When only 1 argument is passed into `filepath.Join`, it won't do anything special other than `filepath.Clean(...)` will be applied over it.
- Partialy resolvess go-gitea#17596 - In the newer versions of `golangci-lint`, golint is deprecated and replaced by the `revive` linter. Thus removing the `golint` linter is a good idea, as we're already using the `revive` linter which covers all the current `golint` cases.
- Partially resolvess go-gitea#17596 - Download specific version(v1.43.0) by default. - If current installed version is older than the minium version, it will download the mininium required version. - Update the install script to avoid deprecated error `golangci/golangci-lint err this script is deprecated, please do not use it anymore. check https://github.com/goreleaser/godownloader/issues/207`
- Partialy resolvess #17596 - In the newer versions of `golangci-lint`, golint is deprecated and replaced by the `revive` linter. Thus removing the `golint` linter is a good idea, as we're already using the `revive` linter which covers all the current `golint` cases. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(The issue was closed by PR merging automatically, reopen it. How to prevent the issue from being closed automatically?) |
Not really, when using closing keywords on github, they will just happen. On the PRs I've on purpose add a little spelling mistake so it wont be recognized as closing keyword, this one got slipped trough. |
- Partialy resolvess #17596 - Resolves `badCall` errors from go-critic `badCall: suspicious Join on 1 argument` - When only 1 argument is passed into `filepath.Join`, it won't do anything special other than `filepath.Clean(...)` will be applied over it. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Fix nil checking on typed interface - Partially resoles #17596 - Resolves SA4023 errors. - Ensure correctly that typed interface are nil. * Remove unnecessary code `NewBleveIndexer` will never return nil, even on errors. * Patch `NewBleveIndexer` * Fix low-level functions * Remove deadcode * Fix GetSession * Close Elastic search when err isn't nil * Update elastic_search.go Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Update golangci-lint in Makefile - Partially resolvess #17596 - Download specific version(v1.43.0) by default. - If current installed version is older than the minium version, it will download the mininium required version. - Update the install script to avoid deprecated error `golangci/golangci-lint err this script is deprecated, please do not use it anymore. check https://github.com/goreleaser/godownloader/issues/207` * Simplify golangci-lint version check * Fix version conversion * Add version that's downloading Co-authored-by: zeripath <art27@cantab.net> * Consistency Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Closing |
- Partialy resolvess go-gitea#17596 - In the newer versions of `golangci-lint`, golint is deprecated and replaced by the `revive` linter. Thus removing the `golint` linter is a good idea, as we're already using the `revive` linter which covers all the current `golint` cases. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix offBy1 errors - Partially resolves go-gitea#17596 - Resolve errors from go-critic `offBy1: Index() can return -1; maybe you wanted to do Index()+1`. * Match golang spec * Remove comments * Update migrations.go * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
- Partialy resolvess go-gitea#17596 - Resolves `badCall` errors from go-critic `badCall: suspicious Join on 1 argument` - When only 1 argument is passed into `filepath.Join`, it won't do anything special other than `filepath.Clean(...)` will be applied over it. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Fix nil checking on typed interface - Partially resoles go-gitea#17596 - Resolves SA4023 errors. - Ensure correctly that typed interface are nil. * Remove unnecessary code `NewBleveIndexer` will never return nil, even on errors. * Patch `NewBleveIndexer` * Fix low-level functions * Remove deadcode * Fix GetSession * Close Elastic search when err isn't nil * Update elastic_search.go Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Update golangci-lint in Makefile - Partially resolvess go-gitea#17596 - Download specific version(v1.43.0) by default. - If current installed version is older than the minium version, it will download the mininium required version. - Update the install script to avoid deprecated error `golangci/golangci-lint err this script is deprecated, please do not use it anymore. check https://github.com/goreleaser/godownloader/issues/207` * Simplify golangci-lint version check * Fix version conversion * Add version that's downloading Co-authored-by: zeripath <art27@cantab.net> * Consistency Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This is a tracking-issue to update golangci-lint to a newer version - this is just to track which errors has to be fixed that comes up with the newer version of golangci-lint, v1.43.0.
The new update seems to catch more errors, which is always nice to have.
filepath.Join
#17608)golint
as linter, as it's been deprecated (Removegolint
as linter #17609)The text was updated successfully, but these errors were encountered: