-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update to golangci-lint
version 1.43.0
#64
Milestone
Comments
svengreb
added a commit
that referenced
this issue
Nov 18, 2021
The currently latest `golangci-lint` version 1.43.0 [1] introduced new linters and updated supported ones: 1. tagliatelle [2] (v1.40.0 [3]) - Handles `struct` tags name casing. This linter is disabled by default, but will be enabled for this template to improve consistency across tag names. 2. errorlint [4] (v1.40.0 [3]) - This linter has been disabled in GH-39 [22] due to prevent false-positive errors, but will be enabled again with the newly introduced `errorf` option [5] being disabled to prevent this from happening again while still taking advantage of the `assert` and `comparison` checks. 3. wrapcheck [6] (v1.40.0 [3]) - This linter is known to cause false-positive errors for the main module (`go list -m`) of the repository where `golangic-lint` is being run, but in version `2.3.0` [7] the `ignorePackageGlobs` option was added that allows to ignore packages by pattern. Therefore in each project the main module should be added as wildcard. Also see tomarrell/wrapcheck#2 [8] for details and discussions about this known problem. 4. golint [9] (v1.40.1 [10]) - Remove deprecated linter. 4.1 The recommended drop-in replacement is revive [21] which is disabled by default, but will be enabled for this template. 5. gofumpt [17] (v1.42.0 [16]) - Add the `lang-version` with value set to `1.17` to target the (currently) latest Go version. 6. bidichk [11] (v1.43.0 [12]) - Checks for dangerous unicode character sequences. This linter is disabled by default, but will be enabled for this template to prevent "trojan source" bugs. 7. nilnil [13] (v1.43.0 [12]) - Checks that there is no simultaneous return of `nil` error and an invalid value. This linter is disabled by default, but will be enabled for this template to prevent ambiguous returns. 8. tenv [14] (v1.43.0 [12]) - Detects using `os.Setenv` instead of `t.Setenv` since Go 1.17. This linter is disabled by default, but will be enabled for this template to prevent errors in tests. 9. contextcheck [15] (v1.43.0 [12]) - Checks if functions whether use a non-inherited context. This linter is disabled by default, but will be enabled for this template to broken call chains and loss of context information. 10. lll [18] - Add the `tab-width` option with value set to `2` to use two spaces for the width of one tab. 11. gci [19] - Add the comma-separated [list of prefixes for local package imports][20] to be put after 3rd-party packages. [1]: https://github.com/golangci/golangci-lint/releases/tag/v1.43.0 [2]: https://github.com/ldez/tagliatelle [3]: https://github.com/golangci/golangci-lint/releases/tag/v1.40.0 [4]: https://github.com/polyfloyd/go-errorlint [5]: https://golangci-lint.run/usage/linters/#errorlint [6]: https://github.com/tomarrell/wrapcheck [7]: https://github.com/tomarrell/wrapcheck/releases/tag/v2.3.0 [8]: tomarrell/wrapcheck#2 [9]: https://github.com/golang/lint [10]: https://github.com/golangci/golangci-lint/releases/tag/v1.40.1 [11]: https://github.com/breml/bidichk [12]: https://github.com/golangci/golangci-lint/releases/tag/v1.43.0 [13]: https://github.com/Antonboom/nilnil [14]: https://github.com/sivchari/tenv [15]: https://github.com/sylvia7788/contextcheck [16]: https://github.com/golangci/golangci-lint/releases/tag/v1.42.0 [17]: https://github.com/mvdan/gofumpt [18]: https://github.com/walle/lll [19]: https://github.com/daixiang0/gci [20]: https://golangci-lint.run/usage/linters/#gci [21]: https://github.com/mgechev/revive [22]: #39 GH-64
svengreb
added a commit
that referenced
this issue
Nov 18, 2021
The currently latest `golangci-lint` version 1.43.0 [1] introduced new linters and updated supported ones: 1. tagliatelle [2] (v1.40.0 [3]) - Handles `struct` tags name casing. This linter is disabled by default, but will be enabled for this template to improve consistency across tag names. 2. errorlint [4] (v1.40.0 [3]) - This linter has been disabled in GH-39 [22] due to prevent false-positive errors, but will be enabled again with the newly introduced `errorf` option [5] being disabled to prevent this from happening again while still taking advantage of the `assert` and `comparison` checks. 3. wrapcheck [6] (v1.40.0 [3]) - This linter is known to cause false-positive errors for the main module (`go list -m`) of the repository where `golangic-lint` is being run, but in version `2.3.0` [7] the `ignorePackageGlobs` option was added that allows to ignore packages by pattern. Therefore in each project the main module should be added as wildcard. Also see tomarrell/wrapcheck#2 [8] for details and discussions about this known problem. 4. golint [9] (v1.40.1 [10]) - Remove deprecated linter. 4.1 The recommended drop-in replacement is revive [21] which is disabled by default, but will be enabled for this template. 5. gofumpt [17] (v1.42.0 [16]) - Add the `lang-version` with value set to `1.17` to target the (currently) latest Go version. 6. bidichk [11] (v1.43.0 [12]) - Checks for dangerous unicode character sequences. This linter is disabled by default, but will be enabled for this template to prevent "trojan source" bugs. 7. nilnil [13] (v1.43.0 [12]) - Checks that there is no simultaneous return of `nil` error and an invalid value. This linter is disabled by default, but will be enabled for this template to prevent ambiguous returns. 8. tenv [14] (v1.43.0 [12]) - Detects using `os.Setenv` instead of `t.Setenv` since Go 1.17. This linter is disabled by default, but will be enabled for this template to prevent errors in tests. 9. contextcheck [15] (v1.43.0 [12]) - Checks if functions whether use a non-inherited context. This linter is disabled by default, but will be enabled for this template to broken call chains and loss of context information. 10. lll [18] - Add the `tab-width` option with value set to `2` to use two spaces for the width of one tab. 11. gci [19] - Add the comma-separated [list of prefixes for local package imports][20] to be put after 3rd-party packages. [1]: https://github.com/golangci/golangci-lint/releases/tag/v1.43.0 [2]: https://github.com/ldez/tagliatelle [3]: https://github.com/golangci/golangci-lint/releases/tag/v1.40.0 [4]: https://github.com/polyfloyd/go-errorlint [5]: https://golangci-lint.run/usage/linters/#errorlint [6]: https://github.com/tomarrell/wrapcheck [7]: https://github.com/tomarrell/wrapcheck/releases/tag/v2.3.0 [8]: tomarrell/wrapcheck#2 [9]: https://github.com/golang/lint [10]: https://github.com/golangci/golangci-lint/releases/tag/v1.40.1 [11]: https://github.com/breml/bidichk [12]: https://github.com/golangci/golangci-lint/releases/tag/v1.43.0 [13]: https://github.com/Antonboom/nilnil [14]: https://github.com/sivchari/tenv [15]: https://github.com/sylvia7788/contextcheck [16]: https://github.com/golangci/golangci-lint/releases/tag/v1.42.0 [17]: https://github.com/mvdan/gofumpt [18]: https://github.com/walle/lll [19]: https://github.com/daixiang0/gci [20]: https://golangci-lint.run/usage/linters/#gci [21]: https://github.com/mgechev/revive [22]: #39 GH-64
svengreb
added a commit
that referenced
this issue
Nov 18, 2021
The currently latest `golangci-lint` version 1.43.0 [1] introduced new linters and updated supported ones: 1. tagliatelle [2] (v1.40.0 [3]) - Handles `struct` tags name casing. This linter is disabled by default, but will be enabled for this template to improve consistency across tag names. 2. errorlint [4] (v1.40.0 [3]) - This linter has been disabled in GH-39 [22] due to prevent false-positive errors, but will be enabled again with the newly introduced `errorf` option [5] being disabled to prevent this from happening again while still taking advantage of the `assert` and `comparison` checks. 3. wrapcheck [6] (v1.40.0 [3]) - This linter is known to cause false-positive errors for the main module (`go list -m`) of the repository where `golangic-lint` is being run, but in version `2.3.0` [7] the `ignorePackageGlobs` option was added that allows to ignore packages by pattern. Therefore in each project the main module should be added as wildcard. Also see tomarrell/wrapcheck#2 [8] for details and discussions about this known problem. 4. golint [9] (v1.40.1 [10]) - Remove deprecated linter. 4.1 The recommended drop-in replacement is revive [21] which is disabled by default, but will be enabled for this template. 5. gofumpt [17] (v1.42.0 [16]) - Add the `lang-version` with value set to `1.17` to target the (currently) latest Go version. 6. bidichk [11] (v1.43.0 [12]) - Checks for dangerous unicode character sequences. This linter is disabled by default, but will be enabled for this template to prevent "trojan source" bugs. 7. nilnil [13] (v1.43.0 [12]) - Checks that there is no simultaneous return of `nil` error and an invalid value. This linter is disabled by default, but will be enabled for this template to prevent ambiguous returns. 8. tenv [14] (v1.43.0 [12]) - Detects using `os.Setenv` instead of `t.Setenv` since Go 1.17. This linter is disabled by default, but will be enabled for this template to prevent errors in tests. 9. contextcheck [15] (v1.43.0 [12]) - Checks if functions whether use a non-inherited context. This linter is disabled by default, but will be enabled for this template to broken call chains and loss of context information. 10. lll [18] - Add the `tab-width` option with value set to `2` to use two spaces for the width of one tab. 11. gci [19] - Add the comma-separated [list of prefixes for local package imports][20] to be put after 3rd-party packages. [1]: https://github.com/golangci/golangci-lint/releases/tag/v1.43.0 [2]: https://github.com/ldez/tagliatelle [3]: https://github.com/golangci/golangci-lint/releases/tag/v1.40.0 [4]: https://github.com/polyfloyd/go-errorlint [5]: https://golangci-lint.run/usage/linters/#errorlint [6]: https://github.com/tomarrell/wrapcheck [7]: https://github.com/tomarrell/wrapcheck/releases/tag/v2.3.0 [8]: tomarrell/wrapcheck#2 [9]: https://github.com/golang/lint [10]: https://github.com/golangci/golangci-lint/releases/tag/v1.40.1 [11]: https://github.com/breml/bidichk [12]: https://github.com/golangci/golangci-lint/releases/tag/v1.43.0 [13]: https://github.com/Antonboom/nilnil [14]: https://github.com/sivchari/tenv [15]: https://github.com/sylvia7788/contextcheck [16]: https://github.com/golangci/golangci-lint/releases/tag/v1.42.0 [17]: https://github.com/mvdan/gofumpt [18]: https://github.com/walle/lll [19]: https://github.com/daixiang0/gci [20]: https://golangci-lint.run/usage/linters/#gci [21]: https://github.com/mgechev/revive [22]: #39 Closes GH-64
svengreb
added a commit
to svengreb/wand
that referenced
this issue
Nov 20, 2021
Updated to `tmpl-go` version `0.9.0` [1] which... 1. updated to `golangci-lint` version `1.43.0` [2] - new linters are introduced and configurations of already supported ones are improved or added. 2. updated the Go module to Go `1.17` [3]. 3. optimized the GitHub action workflows for Go and Node [4] - the `ci` workflow has been optimized by splitting it into new `ci-go` and `ci-node` workflows. 4. updated to the `tmpl` template repository version `0.10.0` [5]. See the full `tmpl-go` version `0.9.0` changelog [1] for all details. [1]: https://github.com/svengreb/tmpl-go/releases/tag/v0.9.0 [2]: svengreb/tmpl-go#64 [3]: svengreb/tmpl-go#66 [4]: svengreb/tmpl-go#68 [5]: svengreb/tmpl-go#70 GH-104
svengreb
added a commit
to svengreb/wand
that referenced
this issue
Nov 20, 2021
Updated to `tmpl-go` version `0.9.0` [1] which... 1. updated to `golangci-lint` version `1.43.0` [2] - new linters are introduced and configurations of already supported ones are improved or added. 2. updated the Go module to Go `1.17` [3]. 3. optimized the GitHub action workflows for Go and Node [4] - the `ci` workflow has been optimized by splitting it into new `ci-go` and `ci-node` workflows. 4. updated to the `tmpl` template repository version `0.10.0` [5]. See the full `tmpl-go` version `0.9.0` changelog [1] for all details. [1]: https://github.com/svengreb/tmpl-go/releases/tag/v0.9.0 [2]: svengreb/tmpl-go#64 [3]: svengreb/tmpl-go#66 [4]: svengreb/tmpl-go#68 [5]: svengreb/tmpl-go#70 Closes GH-104
svengreb
added a commit
that referenced
this issue
Nov 23, 2021
The `time-equal` rule [1] was added in GH-64 [2], but the `revive` linter [3] used by `golangci-lint` does not yet include the rule in the current release version [4] but only merged it into the `main` branch. Therefore linting failed because the rule is not known (yet) and `golangci-lint` exits before running any linter. To fix the problem the `time-equal` rule has been disabled again for now and will be enabled again when it is available in a new `revive` version that is used by `golangci-lint`. [1]: https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal [2]: #64 [3]: https://github.com/mgechev/revive [4]: https://github.com/mgechev/revive/releases/tag/v1.1.2 GH-76
svengreb
added a commit
that referenced
this issue
Nov 23, 2021
…le (#77) The `time-equal` rule [1] was added in GH-64 [2], but the `revive` linter [3] used by `golangci-lint` does not yet include the rule in the current release version [4] but only merged it into the `main` branch. Therefore linting failed because the rule is not known (yet) and `golangci-lint` exits before running any linter. To fix the problem the `time-equal` rule has been disabled again for now and will be enabled again when it is available in a new `revive` version that is used by `golangci-lint`. [1]: https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal [2]: #64 [3]: https://github.com/mgechev/revive [4]: https://github.com/mgechev/revive/releases/tag/v1.1.2 Closes GH-76
svengreb
added a commit
to svengreb/nib
that referenced
this issue
May 9, 2022
Updated to `tmpl-go` version 0.12.0 [1], including the versions in between starting from 0.7.0 [3]: 1. Updated to Go 1.17 [4]. 2. Updated to golangci-lint `v1.43.0` [5]. 3. Updated to `tmpl` template repository version `0.11.0` [6]. 4. Optimized GitHub action workflows for Go and Node [7]. 5. Disabled golangci-lint's default excluded issues [8]. 6. Introduced Go dependency caching and build outputs in `ci-go` workflow [9]. 7. Disabled revive linter rule `package-comments` [10]. 8. Fixed golangci-lint fail to run due to `revives` unknown `time-equal` rule [11]. 9. updated Node.js packages & GitHub actions [12]. This also included changes required for any linter matches. [1]: https://github.com/svengreb/tmpl-go/releases/tag/v0.12.0 [3]: https://github.com/svengreb/tmpl-go/releases/tag/v0.7.0 [4]: svengreb/tmpl-go#66 [5]: svengreb/tmpl-go#64 [6]: svengreb/tmpl-go#91 [7]: svengreb/tmpl-go#68 [8]: svengreb/tmpl-go#72 [9]: svengreb/tmpl-go#74 [10]: svengreb/tmpl-go#78 [11]: svengreb/tmpl-go#76 [12]: svengreb/tmpl-go#42 GH-62
svengreb
added a commit
to svengreb/nib
that referenced
this issue
May 9, 2022
Updated to `tmpl-go` version 0.12.0 [1], including the versions in between starting from 0.7.0 [3]: 1. Updated to Go 1.17 [4]. 2. Updated to golangci-lint `v1.43.0` [5]. 3. Updated to `tmpl` template repository version `0.11.0` [6]. 4. Optimized GitHub action workflows for Go and Node [7]. 5. Disabled golangci-lint's default excluded issues [8]. 6. Introduced Go dependency caching and build outputs in `ci-go` workflow [9]. 7. Disabled revive linter rule `package-comments` [10]. 8. Fixed golangci-lint fail to run due to `revives` unknown `time-equal` rule [11]. 9. updated Node.js packages & GitHub actions [12]. This also included changes required for any linter matches. [1]: https://github.com/svengreb/tmpl-go/releases/tag/v0.12.0 [3]: https://github.com/svengreb/tmpl-go/releases/tag/v0.7.0 [4]: svengreb/tmpl-go#66 [5]: svengreb/tmpl-go#64 [6]: svengreb/tmpl-go#91 [7]: svengreb/tmpl-go#68 [8]: svengreb/tmpl-go#72 [9]: svengreb/tmpl-go#74 [10]: svengreb/tmpl-go#78 [11]: svengreb/tmpl-go#76 [12]: svengreb/tmpl-go#42 GH-62
svengreb
added a commit
to svengreb/nib
that referenced
this issue
May 9, 2022
Updated to `tmpl-go` version 0.12.0 [1], including the versions in between starting from 0.7.0 [3]: 1. Updated to Go 1.17 [4]. 2. Updated to golangci-lint `v1.43.0` [5]. 3. Updated to `tmpl` template repository version `0.11.0` [6]. 4. Optimized GitHub action workflows for Go and Node [7]. 5. Disabled golangci-lint's default excluded issues [8]. 6. Introduced Go dependency caching and build outputs in `ci-go` workflow [9]. 7. Disabled revive linter rule `package-comments` [10]. 8. Fixed golangci-lint fail to run due to `revives` unknown `time-equal` rule [11]. 9. updated Node.js packages & GitHub actions [12]. This also included changes required for any linter matches. [1]: https://github.com/svengreb/tmpl-go/releases/tag/v0.12.0 [3]: https://github.com/svengreb/tmpl-go/releases/tag/v0.7.0 [4]: svengreb/tmpl-go#66 [5]: svengreb/tmpl-go#64 [6]: svengreb/tmpl-go#91 [7]: svengreb/tmpl-go#68 [8]: svengreb/tmpl-go#72 [9]: svengreb/tmpl-go#74 [10]: svengreb/tmpl-go#78 [11]: svengreb/tmpl-go#76 [12]: svengreb/tmpl-go#42 GH-62
svengreb
added a commit
to svengreb/golib
that referenced
this issue
May 10, 2022
Updated to `tmpl-go` version `0.12.0` [1], including the versions in between starting from 0.7.0 [3]: 1. Updated to Go 1.17 [4]. 2. Updated to golangci-lint `v1.43.0` [5]. 3. Updated to `tmpl` template repository version `0.11.0` [6]. 4. Optimized GitHub action workflows for Go and Node [7]. 5. Disabled golangci-lint's default excluded issues [8]. 6. Introduced Go dependency caching and build outputs in `ci-go` workflow [9]. 7. Disabled revive linter rule `package-comments` [10]. 8. Fixed golangci-lint fail to run due to `revives` unknown `time-equal` rule [11]. 9. Updated Node.js packages & GitHub actions [12]. This also includes changes required for any linter matches. [1]: https://github.com/svengreb/tmpl-go/releases/tag/v0.12.0 [3]: https://github.com/svengreb/tmpl-go/releases/tag/v0.7.0 [4]: svengreb/tmpl-go#66 [5]: svengreb/tmpl-go#64 [6]: svengreb/tmpl-go#91 [7]: svengreb/tmpl-go#68 [8]: svengreb/tmpl-go#72 [9]: svengreb/tmpl-go#74 [10]: svengreb/tmpl-go#78 [11]: svengreb/tmpl-go#76 [12]: svengreb/tmpl-go#42 GH-41
svengreb
added a commit
to svengreb/golib
that referenced
this issue
May 10, 2022
Updated to `tmpl-go` version `0.12.0` [1], including the versions in between starting from 0.7.0 [3]: 1. Updated to Go 1.17 [4]. 2. Updated to golangci-lint `v1.43.0` [5]. 3. Updated to `tmpl` template repository version `0.11.0` [6]. 4. Optimized GitHub action workflows for Go and Node [7]. 5. Disabled golangci-lint's default excluded issues [8]. 6. Introduced Go dependency caching and build outputs in `ci-go` workflow [9]. 7. Disabled revive linter rule `package-comments` [10]. 8. Fixed golangci-lint fail to run due to `revives` unknown `time-equal` rule [11]. 9. Updated Node.js packages & GitHub actions [12]. This also includes changes required for any linter matches. [1]: https://github.com/svengreb/tmpl-go/releases/tag/v0.12.0 [3]: https://github.com/svengreb/tmpl-go/releases/tag/v0.7.0 [4]: svengreb/tmpl-go#66 [5]: svengreb/tmpl-go#64 [6]: svengreb/tmpl-go#91 [7]: svengreb/tmpl-go#68 [8]: svengreb/tmpl-go#72 [9]: svengreb/tmpl-go#74 [10]: svengreb/tmpl-go#78 [11]: svengreb/tmpl-go#76 [12]: svengreb/tmpl-go#42 GH-41
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The currently latest
golangci-lint
version 1.43.0 introduced new linters and updated supported ones:struct
tags name casing.This linter is disabled by default, but will be enabled for this template to improve consistency across tag names.
errorf
option being disabled to prevent this from happening again while still taking advantage of theassert
andcomparison
checks.go list -m
) of the repository wheregolangic-lint
is being run, but in version2.3.0
theignorePackageGlobs
option was added that allows to ignore packages by pattern. Therefore in each project the main module should be added as wildcard. Also see tomarrell/wrapcheck#2 for details and discussions about this known problem.4.1 The recommended drop-in replacement is revive which is disabled by default, but will be enabled for this template.
lang-version
with value set to1.17
to target the (currently) latest Go version.This linter is disabled by default, but will be enabled for this template to prevent "trojan source" bugs.
nil
error and an invalid value.This linter is disabled by default, but will be enabled for this template to prevent ambiguous returns.
os.Setenv
instead oft.Setenv
since Go 1.17.This linter is disabled by default, but will be enabled for this template to prevent errors in tests.
This linter is disabled by default, but will be enabled for this template to broken call chains and loss of context information.
tab-width
option with value set to2
to use two spaces for the width of one tab.The text was updated successfully, but these errors were encountered: