golangci/golangci-lint (golangci/golangci-lint)
### [`v1.59.1`](https://togithub.com/golangci/golangci-lint/releases/tag/v1.59.1)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.59.0...v1.59.1)
`golangci-lint` is a free and open-source project built by volunteers.
If you value it, consider supporting us, the [maintainers](https://opencollective.com/golangci-lint) and [linter authors](https://golangci-lint.run/product/thanks/).
We appreciate it! :heart:
For key updates, see the [changelog](https://golangci-lint.run/product/changelog/#1591).
#### Changelog
- [`f738736`](https://togithub.com/golangci/golangci-lint/commit/f7387361) build(deps): bump github.com/Antonboom/testifylint from 1.3.0 to 1.3.1 ([#4759](https://togithub.com/golangci/golangci-lint/issues/4759))
- [`44b3cdd`](https://togithub.com/golangci/golangci-lint/commit/44b3cdd1) build(deps): bump github.com/go-viper/mapstructure/v2 from 2.0.0-alpha.1 to 2.0.0 ([#4788](https://togithub.com/golangci/golangci-lint/issues/4788))
- [`1a55854`](https://togithub.com/golangci/golangci-lint/commit/1a55854a) build(deps): bump github.com/golangci/misspell from 0.5.1 to 0.6.0 ([#4804](https://togithub.com/golangci/golangci-lint/issues/4804))
- [`9a7a1ad`](https://togithub.com/golangci/golangci-lint/commit/9a7a1ad4) build(deps): bump github.com/polyfloyd/go-errorlint from 1.5.1 to 1.5.2 ([#4785](https://togithub.com/golangci/golangci-lint/issues/4785))
- [`aaff918`](https://togithub.com/golangci/golangci-lint/commit/aaff9184) build(deps): bump github.com/sashamelentyev/usestdlibvars from 1.25.0 to 1.26.0 ([#4801](https://togithub.com/golangci/golangci-lint/issues/4801))
- [`a0d2c83`](https://togithub.com/golangci/golangci-lint/commit/a0d2c830) build(deps): bump github.com/shirou/gopsutil/v3 from 3.24.4 to 3.24.5 ([#4782](https://togithub.com/golangci/golangci-lint/issues/4782))
- [`2042b1f`](https://togithub.com/golangci/golangci-lint/commit/2042b1f1) build(deps): bump go-simpler.org/sloglint from 0.7.0 to 0.7.1 ([#4784](https://togithub.com/golangci/golangci-lint/issues/4784))
- [`327a78a`](https://togithub.com/golangci/golangci-lint/commit/327a78a8) build(deps): bump golang.org/x/tools from 0.21.0 to 0.22.0 ([#4802](https://togithub.com/golangci/golangci-lint/issues/4802))
- [`e1a8055`](https://togithub.com/golangci/golangci-lint/commit/e1a80557) fix: SARIF format require issue column >= 1 ([#4775](https://togithub.com/golangci/golangci-lint/issues/4775))
- [`88f60c8`](https://togithub.com/golangci/golangci-lint/commit/88f60c8c) fix: gomnd deprecated configuration compatibility ([#4768](https://togithub.com/golangci/golangci-lint/issues/4768))
- [`8173166`](https://togithub.com/golangci/golangci-lint/commit/81731668) fix: init empty result slice for SARIF printer ([#4758](https://togithub.com/golangci/golangci-lint/issues/4758))
- [`02740ea`](https://togithub.com/golangci/golangci-lint/commit/02740ea1) intrange: add style preset ([#4797](https://togithub.com/golangci/golangci-lint/issues/4797))
- [`615b873`](https://togithub.com/golangci/golangci-lint/commit/615b873d) unparam: bump to HEAD ([#4786](https://togithub.com/golangci/golangci-lint/issues/4786))
### [`v1.59.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1590)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.58.2...v1.59.0)
1. Enhancements
- Add SARIF output format
- Allow the analysis of generated files (`issues.exclude-generated: disable`)
2. Updated linters
- `errcheck`: fix deprecation warning
- `go-critic`: from 0.11.3 to 0.11.4
- `gosec`: from 2.20.0 to [`5f0084e`](https://togithub.com/golangci/golangci-lint/commit/5f0084eb01a9) (fix G601 and G113 performance issues)
- `sloglint`: from 0.6.0 to 0.7.0 (new option `forbidden-keys`)
- `testifylint`: from 1.2.0 to 1.3.0 (new checker `negative-positive` and new option `go-require.ignore-http-handlers`)
3. Misc.
- ️️⚠️ Deprecate `github-action` output format
- ️️⚠️ Deprecate `issues.exclude-generated-strict` option (replaced by `issues.exclude-generated: strict`)
- ️️⚠️ Add warning about disabled and deprecated linters (level 2)
### [`v1.58.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1582)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.58.1...v1.58.2)
1. Updated linters
- `canonicalheader`: from 1.0.6 to 1.1.1
- `gosec`: from 2.19.0 to 2.20.0
- `musttag`: from 0.12.1 to 0.12.2
- `nilnil`: from 0.1.8 to 0.1.9
2. Documentation
- Improve integrations and install pages
### [`v1.58.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1581)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.58.0...v1.58.1)
1. Updated linters
- `tagalign`: from 1.3.3 to 1.3.4
- `protogetter`: from 0.3.5 to 0.3.6
- `gochecknoinits`: fix analyzer name
2. Fixes
- Restores previous `gihub-actions` output format (removes GitHub Action problem matchers)
### [`v1.58.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1580)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.2...v1.58.0)
1. New linters
- `fatcontext`: https://github.com/Crocmagnon/fatcontext
- `canonicalheader`: https://github.com/lasiar/canonicalheader
2. Updated linters
- `copyloopvar`: from 1.0.10 to 1.1.0 (`ignore-alias` is replaced by `check-alias` with the opposite behavior)
- `decorder`: from 0.4.1 to 0.4.2
- `errname`: from 0.1.12 to 0.1.13
- `errorlint`: from 1.4.8 to 1.5.1 (new options `allowed-errors` and `allowed-errors-wildcard`)
- `execinquery`: deprecate linter ⚠️
- `gci`: from 0.12.3 to 0.13.4 (new section `localModule`)
- `gocritic`: from 0.11.2 to 0.11.3
- `spancheck`: from 0.5.3 to 0.6.1
- `goerr113` is replaced by `err113` ⚠️
- `gomnd` is replaced by `mnd` ⚠️
- `gomodguard`: from 1.3.1 to 1.3.2
- `grouper`: from 1.1.1 to 1.1.2
- `intrange`: from 0.1.1 to 0.1.2
- `mirror`: from 1.1.0 to 1.2.0
- `misspell`: from 0.4.1 to 0.5.1
- `musttag`: from 0.9.0 to 0.12.1
- `nilnil`: from 0.1.7 to 0.1.8
- `nonamedreturns`: from 1.0.4 to 1.0.5
- `promlinter`: from 0.2.0 to 0.3.0
- `sloglint`: from 0.5.0 to 0.6.0
- `unparam`: bump to HEAD ([`063aff9`](https://togithub.com/golangci/golangci-lint/commit/063aff900ca150b80930c8de76f11d7e6488222f))
- `whitespace`: from 0.1.0 to 0.1.1
3. Enhancements
- Speed up "fast" linters when only "fast" linters are run: between 40% and 80% faster at first run (i.e. without cache)
4. Fixes
- Use version with module plugins
- Skip `go.mod` report inside autogenerated processor
- Keep only `typecheck` issues when needed
- Don't hide `typecheck` errors inside diff processor
5. Misc.
- ⚠️ log an error when using previously deprecated linters ([Linter Deprecation Cycle](https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle))
- [`deadcode`](https://togithub.com/remyoudompheng/go-misc/tree/master/deadcode): deprecated since v1.49.0 (2022-08-23).
- [`exhaustivestruct`](https://togithub.com/mbilski/exhaustivestruct): deprecated since v1.46.0 (2022-05-08).
- [`golint`](https://togithub.com/golang/lint): deprecated since v1.41.0 (2021-06-15).
- [`ifshort`](https://togithub.com/esimonov/ifshort): deprecated since v1.48.0 (2022-08-04).
- [`interfacer`](https://togithub.com/mvdan/interfacer): deprecated since v1.38.0 (2021-03-03).
- [`maligned`](https://togithub.com/mdempsky/maligned): deprecated since v1.38.0 (2021-03-03).
- [`nosnakecase`](https://togithub.com/sivchari/nosnakecase): deprecated since v1.48.0 (2022-08-04).
- [`scopelint`](https://togithub.com/kyoh86/scopelint): deprecated since v1.39.0 (2021-03-25).
- [`structcheck`](https://togithub.com/opennota/check): deprecated since v1.49.0 (2022-08-23).
- [`varcheck`](https://togithub.com/opennota/check): deprecated since v1.49.0 (2022-08-23).
- ⚠️ Deprecate usage of linter alternative names
- Remove help display on errors with `config verify` command
- Add `pre-commit` hook to run `config verify`
- Improve `github-action` output
6. Documentation
- Remove deprecated Atom from Editor Integrations
GitHub Action (v5.1.0) for golangci-lint:
- supports for `pull`, `pull_request_target`, and `merge_group` events with the option `only-new-issues`.
- ️️⚠️ `skip-pkg-cache` and `skip-build-cache` have been removed because the cache related to Go itself is already handled by `actions/setup-go`.
- with golangci-lint v1.58, the file information (path and position) will be displayed on the log.
### [`v1.57.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1572)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.1...v1.57.2)
1. Updated linters
- `contextcheck`: from 1.1.4 to 1.1.5
- `copyloopvar`: from 1.0.8 to 1.0.10
- `ginkgolinter`: from 0.16.1 to 0.16.2
- `goconst`: from 1.7.0 to 1.7.1
- `gomoddirectives`: from 0.2.3 to 0.2.4
- `intrange`: from 0.1.0 to 0.1.1
2. Misc.
- Display warnings on deprecated linter options
- Fix missing `colored-tab` output format
- Fix TeamCity `inspectionType` service message
3. Documentation
- Remove invalid example about mixing files and directory
- Improve linters page
### [`v1.57.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1571)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.0...v1.57.1)
1. Fixes
- Ignore issues with invalid position (e.g. `contextcheck`).
### [`v1.57.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1570)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.2...v1.57.0)
1. New linters
- `copyloopvar`: https://github.com/karamaru-alpha/copyloopvar
- `intrange`: https://github.com/ckaznocha/intrange
2. Updated linters
- `dupword`: from 0.0.13 to 0.0.14
- `gci`: from 0.12.1 to 0.12.3
- `ginkgolinter`: from 0.15.2 to 0.16.1 (new option `force-expect-to`, `validate-async-intervals`, and `forbid-spec-pollution`)
- `go-critic`: from 0.11.1 to 0.11.2
- `go-critic`: support of `enable-all` and `disable-all` options
- `go-spancheck`: from 0.5.2 to 0.5.3
- `gomodguard`: from 1.3.0 to 1.3.1
- `govet`: deprecation of `check-shadowing` ⚠️
- `govet`: disable temporarily `httpresponse` because of a bug [https://github.com/golang/go/issues/66259](https://togithub.com/golang/go/issues/66259)
- `misspell`: add `extra-words`
- `musttag`: from 0.8.0 to 0.9.0
- `nakedret`: from 2.0.2 to 2.0.4
- `paralleltest`: from 1.0.9 to 1.0.10
- `perfsprint`: from 0.6.0 to 0.7.1 (new option `strconcat`)
- `protogetter`: from 0.3.4 to 0.3.5
- `revive`: add `exclude` option
- `sloglint`: from 0.4.0 to 0.5.0 (new option `no-global`)
- `staticcheck`: from 0.4.6 to 0.4.7
- `testifylint`: from 1.1.2 to 1.2.0 (new option `bool-compare`)
- `unconvert`: to HEAD (new options `fast-math` and `safe`)
- `wrapcheck`: from 2.8.1 to 2.8.3
- Disable `copyloopvar` and `intrange` on Go < 1.22
3. Enhancements
- 🧩New custom linters system https://golangci-lint.run/plugins/module-plugins/
- Allow running only a specific linter without modifying the file configuration (`--enable-only`)
- Allow custom sort order for the reports (`output.sort-order`)
- Automatically adjust the maximum concurrency to the container CPU quota if `run.concurrency=0`
- Add `config verify` command to check the configuration against the JSON Schema
- Option to strictly follow Go generated file convention (`issues.exclude-generated-strict`)
- Syntax to not override `severity` from linters (`@linter`)
- Use severities from `gosec`
- Create automatically directory related to `output.formats.path`
- Use the first issue without inline on `mergeLineIssues` on multiple issues
4. Misc.
- ⚠️ Inactivate deprecated linters (`deadcode`, `exhaustivestruct`, `golint`, `ifshort`, `interfacer`, `maligned`, `nosnakecase`, `scopelint`, `structcheck`, `varcheck`)
- ⚠️ Deprecated CLI flags have been removed (deprecated since 2018)
- ⚠️ Move `show-stats` option from `run` to `output` configuration section
- ⚠️ Replace `run.skip-xxx` options by `issues.exclude-xxx` options
- ⚠️ Replace `output.format` by `output.formats` with a new file configuration syntax
- Internal rewrite of the CLI
- Improve 'no go files to analyze' message
- Use `GOTOOLCHAIN=auto` inside the Docker images
5. Documentation
- ⚠️ Define the linter deprecation cycle https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
- 🎉Use information from the previous release to create linter pages
- Publish JSON schema on https://golangci-lint.run/jsonschema/golangci.jsonschema.json
- Reorganize documentation pages
- Add an explanation about the configuration file inside golangci-lint repository
**⚠️ Important ⚠️**
1. Deprecated linters are inactivated, you still need to disable them if you are using `enable-all`.
2. Deprecated CLI flags (about linter settings and `deadline`) have been removed.
### [`v1.56.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1562)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.1...v1.56.2)
1. updated linters
- `go-critic`: from 0.11.0 to 0.11.1
- `gosec`: from 2.18.2 to 2.19.0
- `testifylint`: from 1.1.1 to 1.1.2
- `usestdlibvars`: from 1.24.0 to 1.25.0
- `wsl`: from 4.2.0 to 4.2.1
2. misc.
- Fix missing version in Docker image
3. Documentation
- Explain the limitation of `new-from-rev` and `new-from-patch`
### [`v1.56.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1561)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.0...v1.56.1)
1. updated linters
- `errcheck`: from 1.6.3 to 1.7.0
- `govet`: disable `loopclosure` with go1.22
- `revive`: from 1.3.6 to 1.3.7
- `testifylint`: from 1.1.0 to 1.1.1
### [`v1.56.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1560)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.2...v1.56.0)
1. new linters
- `spancheck`: https://github.com/jjti/go-spancheck
2. updated linters
- `depguard`: from 2.1.0 to 2.2.0
- `exhaustive`: from 0.11.0 to 0.12.0
- `exhaustruct`: from 3.1.0 to 3.2.0
- `gci`: from 0.11.2 to 0.12.1
- `ginkgolinter`: from 0.14.1 to 0.15.2
- `go-check-sumtype`: from 0.1.3 to 0.1.4
- `go-critic`: from 0.9.0 to 0.11.0
- `go-errorlint`: from 1.4.5 to 1.4.8
- `go-spancheck`: from 0.4.2 to 0.5.2
- `goconst`: from 1.6.0 to 1.7.0
- `godot`: from 1.4.15 to 1.4.16
- `gofumpt`: from 0.5.0 to 0.6.0
- `inamedparam`: from 0.1.2 to 0.1.3
- `ineffassign`: from 0.0.0-20230610083614-0e73809eb601 to 0.1.0
- `ireturn`: from 0.2.2 to 0.3.0
- `misspell`: add mode option
- `musttag`: from v0.7.2 to v0.8.0
- `paralleltest`: from 1.0.8 to 1.0.9
- `perfsprint`: from 0.2.0 to 0.6.0
- `protogetter`: from 0.2.3 to 0.3.4
- `revive`: from 1.3.4 to 1.3.6
- `sloglint`: add static-msg option
- `sloglint`: from 0.1.2 to 0.4.0
- `testifylint`: from 0.2.3 to 1.1.0
- `unparam`: from [`2022122`](https://togithub.com/golangci/golangci-lint/commit/20221223090309)-7455f1af531d to [`2024010`](https://togithub.com/golangci/golangci-lint/commit/20240104100049)-c549a3470d14
- `whitespace`: update after moving to the `analysis` package
- `wsl`: from 3.4.0 to 4.2.0
- `zerologlint`: from 0.1.3 to 0.1.5
3. misc.
- 🎉 go1.22 support
- Implement stats per linter with a flag
- Make versioning inside Docker image consistent with binaries
- Parse Go RC version
4. Documentation
- Fix `noctx` description
- Add missing fields to `.golangci.reference.yml`
- Improve `.golangci.reference.yml` defaults
- `typecheck`: improve FAQ
- `exhaustruct`: note that struct regular expressions are expected to match the entire `package/name/structname`
- `wrapcheck`: adjust `ignoreSigs` to new defaults
**Important**
`testifylint` has [breaking changes](https://togithub.com/Antonboom/testifylint/releases/tag/v1.0.0) about enabling/disabling checks:
- If you were using the option `enable` with a filtered list of checks, you should either add `disable-all: true` (1) or use `disable` field (2).
```yml
```
### Example (1)
testifylint:
disable-all: true
enable:
- bool-compare
- compares
- empty
- error-is-as
- error-nil
- expected-actual
- go-require
- float-compare
- len
- nil-compare
- require-error
### - suite-dont-use-pkg
- suite-extra-assert-call
- suite-thelper
```
```yml
### Example (2)
testifylint:
disable:
- suite-dont-use-pkg
```
### [`v1.55.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1552)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.1...v1.55.2)
1. updated linters
- `ireturn`: from 0.2.1 to 0.2.2
- `ginkgolinter`: from 0.14.0 to 0.14.1
### [`v1.55.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1551)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.0...v1.55.1)
1. updated linters
- `gosec`: from 2.18.1 to 2.18.2
2. misc.
- `revgrep`: from v0.5.0 to v0.5.2 (support git < 2.41.0)
- output: convert backslashes to forward slashes for GitHub Action annotations printer
### [`v1.55.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1550)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.54.2...v1.55.0)
1. new linters
- `gochecksumtype`: https://github.com/alecthomas/go-check-sumtype
- `inamedparam`: https://github.com/macabu/inamedparam
- `perfsprint`: https://github.com/catenacyber/perfsprint
- `protogetter`: https://github.com/ghostiam/protogetter
- `sloglint`: https://github.com/go-simpler/sloglint
- `testifylint`: https://github.com/Antonboom/testifylint
2. updated linters
- `bidichk`: from 0.2.4 to 0.2.7
- `decorder`: from 0.4.0 to 0.4.1
- `dupword`: from 0.0.12 to 0.0.13
- `errchkjson`: from 0.3.1 to 0.3.6
- `gci`: from 0.11.0 to 0.11.2
- `ginkgolinter`: from 0.13.5 to 0.14.0
- `go-errorlint`: from 1.4.4 to 1.4.5
- `gocognit`: from 1.0.7 to 1.1.0
- `goconst`: from 1.5.1 to 1.6.0
- `godot`: from 1.4.14 to 1.4.15
- `gofmt`: update to HEAD
- `goimports`: update to HEAD
- `gosec`: from 2.17.0 to 2.18.1
- `gosmopolitan`: from 1.2.1 to 1.2.2
- `govet`: add `appends` analyzer
- `ireturn`: from 0.2.0 to 0.2.1
- `protogetter`: from 0.2.2 to 0.2.3
- `revgrep`: from [`745bb2f`](https://togithub.com/golangci/golangci-lint/commit/745bb2f7c2e6) to v0.5.0
- `revive`: from 1.3.2 to 1.3.4
- `sqlclosecheck`: from 0.4.0 to 0.5.1
- `staticcheck`: from 0.4.5 to 0.4.6
- `tagalign`: from 1.3.2 to 1.3.3
- `unused`: support passing in options
3. misc.
- Add a pre-commit hook to check all files
4. Documentation
- add source options to exclude-rules docs
- `gosec`: add G602 to includes/excludes inside .golangci.reference.yml
### [`v1.54.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1542)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.54.1...v1.54.2)
1. updated linters:
- `errname`: from 0.1.10 to 0.1.12
- `ginkgolinter`: from 0.13.3 to 0.13.5
- `go-errorlint`: from 1.4.3 to 1.4.4
- `godot`: from 1.4.11 to 1.4.14
- `gosec`: from 2.16.0 to 2.17.0
- `musttag`: from 0.7.1 to 0.7.2
- `nilnil`: from 0.1.5 to 0.1.7
- `staticcheck`: from 0.4.3 to 0.4.5
- `usestdlibvars`: from 1.23.0 to 1.24.0
- `govet`: add missing `directive` and `slog` passes
### [`v1.54.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1541)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.54.0...v1.54.1)
1. updated linters:
- `go-critic`: from 0.8.2 to 0.9.0
2. misc.
- plugin: temporarily hide warning about using plugins using the old API
### [`v1.54.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1540)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.53.3...v1.54.0)
1. updated linters:
- `decorder`: from 0.2.3 to 0.4.0
- `dupword`: from 0.0.11 to 0.0.12
- `errorlint`: from 1.4.2 to 1.4.3
- `exhaustruct`: from 2.3.0 to 3.1.0
- `forbidigo`: from 1.5.3 to 1.6.0
- `funlen`: from 0.0.3 to 0.1.0
- `gci`: from 0.10.1 to 0.11.0
- `ginkgolinter`: from 0.12.1 to 0.13.3
- `go-critic`: from 0.8.1 to 0.8.2
- `go-errorlint`: from 1.4.2 to 1.4.3
- `go-exhaustruct`: from 2.3.0 to 3.1.0
- `gocognit`: from 1.0.6 to 1.0.7
- `gocritic`: from 0.8.1 to 0.8.2
- `gofmt`: autofix missing newline at EOF
- `misspell`: 0.4.0 to 0.4.1
- `musttag`: from 0.7.0 to 0.7.1
- `paralleltest`: from 1.0.7 to 1.0.8
- `tagalign`: from 1.2.2 to 1.3.2
- `typecheck`: explain it and remove it from the linter list
- `zerologlint`: from 0.1.2 to 0.1.3
2. misc.
- 🎉 go1.21 support
- plugin: include custom linters in `enable-all`
- plugin: allow to use settings for plugins
3. Documentation
- Add linter descriptions.
**Important**
`ruleguard` (a "rule" inside `gocritic`) was disabled in this release (v1.54.0) and was enabled again in the next release (v1.54.1).
`exhaustruct` has breaking changes with regular expressions, more details [here](https://togithub.com/GaijinEntertainment/go-exhaustruct/releases/tag/v3.0.0).
### [`v1.53.3`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1533)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.53.2...v1.53.3)
1. updated linters:
- `cyclop`: from 1.2.0 to 1.2.1
- `exhaustive`: from 0.10.0 to 0.11.0
- `forbidigo`: from 1.5.1 to 1.5.3
- `ginkgolinter`: from 0.12.2 to 0.12.1
- `ineffassign`: bump to HEAD
- `nakedret`: from 2.0.1 to 2.0.2
- `zerologlint`: from 0.1.1 to 0.1.2
2. misc.
- codeclimate: reduce memory allocation
- support illumos/amd64
### [`v1.53.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1532)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.53.1...v1.53.2)
1. updated linters
- `depguard`: from v2.0.1 to 2.1.0
2. misc.
- `depguard`: throw error only when the linter is called
### [`v1.53.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1531)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.53.0...v1.53.1)
1. misc.
- `depguard`: fix GOROOT detection
- `importas`: fix duplication detection when aliases use regular expression replacement pattern
### [`v1.53.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1530)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.52.2...v1.53.0)
1. new linters
- `gosmopolitan`: https://github.com/xen0n/gosmopolitan
- `mirror`: https://github.com/butuzov/mirror
- `tagalign`: https://github.com/4meepo/tagalign
- `zerologlint`: https://github.com/ykadowak/zerologlint
2. updated linters
- `bodyclose`: bump to HEAD
- `containedctx`: from 1.0.2 to 1.0.3
- `depguard`: migrate to v2
- `errname`: from 0.1.9 to 0.1.10
- `exhaustive`: from 0.9.5 to 0.10.0
- `forbidigo`: better support for configuring complex rules
- `gci`: improve error message
- `ginkgolinter`: add suppress-async-assertion option
- `ginkgolinter`: from 0.9.0 to 0.12.0
- `go-critic`: from 0.7.0 to 0.8.1
- `go-errorlint`: from 1.4.0 to 1.4.2
- `gofumpt`: from 0.4.0 to 0.5.0
- `gosec`: convert global settings as map with proper key type
- `gosec`: from 2.15.0 to 2.16.0
- `importas`: detect duplicate alias or package in the configuration
- `importas`: fix typo in logs
- `ireturn`: from 0.1.1 to 0.2.0
- `musttag`: from 0.5.0 to 0.7.0
- `nakedret`: to 2.0.1
- `nilnil`: from 0.1.3 to 0.1.5
- `paralleltest`: from 1.0.6 to 1.0.7
- `revive`: from 1.3.1 to 1.3.2
- `tagliatelle`: from 0.4.0 to 0.5.0
- `usestdlibvars`: fix configuration
3. misc.
- `golang.org/x/tools`: from 0.7.0 to 0.9.2
- add loongarch64 to the install script
- output: add colored-tab
- remove warning when the config file is explicitly stdin
- rules: support inverted path match
4. Documentation
- `mnd`: clarify ignore usage examples to be regexps
- `tagliatelle`: update documentation
- improve features section
- update supported Go versions FAQ
### [`v1.52.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1522)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.52.1...v1.52.2)
1. updated linters
- `tparallel`: from 0.3.0 to 0.3.1
2. misc.
- fix: pre-commit `require_serial` and `pass_filenames`
### [`v1.52.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1521)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.52.0...v1.52.1)
1. misc.
- fix: improve panic management
- fix: the combination of --fix and --path-prefix
### [`v1.52.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1520)
[Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.51.2...v1.52.0)
1. updated linters
- `asciicheck`: from 0.1.1 to 0.2.0
- `bidichk`: from 0.2.3 to 0.2.4
- `contextcheck`: from 1.1.3 to 1.1.4
- `dupword`: from 0.0.9 to 0.0.11
- `durationcheck`: from 0.0.9 to 0.0.10
- `errchkjson`: from 0.3.0 to 0.3.1
- `errname`: from 0.1.7 to 0.1.9
- `forbidigo`: from 1.4.0 to 1.5.1
- `gci`: from 0.9.1 to 0.10.1
- `ginkgolinter`: from 0.8.1 to 0.9.0
- `go-critic`: from 0.6.7 to 0.7.0
- `go-errorlint`: from 1.1.0 to 1.4.0
- `godox`: bump to HEAD
- `lll`: skip go command
- `loggercheck`: from 0.9.3 to 0.9.4
- `musttag`: from 0.4.5 to 0.5.0
- `nilnil`: from 0.1.1 to 0.1.3
- `noctx`: from 0.0.1 to 0.0.2
- `revive`: from 1.2.5 to 1.3.1
- `rowserrcheck`: remove limitation related to generics support
- `staticcheck`: from 0.4.2 to 0.4.3
- `testpackage`: from 1.1.0 to 1.1.1
- `tparallel`: from 0.2.1 to 0.3.0
- `wastedassign`: remove limitation related to generics support
- `wrapcheck`: from 2.8.0 to 2.8.1
2. misc.
- Add TeamCity output format
- Consider path prefix when matching path patterns
- Add Go version to version information
3. Documentation
- Add Tekton in Trusted By page
- Clarify that custom linters are not enabled by default
- Remove description for deprecated "go" option
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
1.51.2
->1.59.1
1.49
->1.59.1
Release Notes
golangci/golangci-lint (golangci/golangci-lint)
### [`v1.59.1`](https://togithub.com/golangci/golangci-lint/releases/tag/v1.59.1) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.59.0...v1.59.1) `golangci-lint` is a free and open-source project built by volunteers. If you value it, consider supporting us, the [maintainers](https://opencollective.com/golangci-lint) and [linter authors](https://golangci-lint.run/product/thanks/). We appreciate it! :heart: For key updates, see the [changelog](https://golangci-lint.run/product/changelog/#1591). #### Changelog - [`f738736`](https://togithub.com/golangci/golangci-lint/commit/f7387361) build(deps): bump github.com/Antonboom/testifylint from 1.3.0 to 1.3.1 ([#4759](https://togithub.com/golangci/golangci-lint/issues/4759)) - [`44b3cdd`](https://togithub.com/golangci/golangci-lint/commit/44b3cdd1) build(deps): bump github.com/go-viper/mapstructure/v2 from 2.0.0-alpha.1 to 2.0.0 ([#4788](https://togithub.com/golangci/golangci-lint/issues/4788)) - [`1a55854`](https://togithub.com/golangci/golangci-lint/commit/1a55854a) build(deps): bump github.com/golangci/misspell from 0.5.1 to 0.6.0 ([#4804](https://togithub.com/golangci/golangci-lint/issues/4804)) - [`9a7a1ad`](https://togithub.com/golangci/golangci-lint/commit/9a7a1ad4) build(deps): bump github.com/polyfloyd/go-errorlint from 1.5.1 to 1.5.2 ([#4785](https://togithub.com/golangci/golangci-lint/issues/4785)) - [`aaff918`](https://togithub.com/golangci/golangci-lint/commit/aaff9184) build(deps): bump github.com/sashamelentyev/usestdlibvars from 1.25.0 to 1.26.0 ([#4801](https://togithub.com/golangci/golangci-lint/issues/4801)) - [`a0d2c83`](https://togithub.com/golangci/golangci-lint/commit/a0d2c830) build(deps): bump github.com/shirou/gopsutil/v3 from 3.24.4 to 3.24.5 ([#4782](https://togithub.com/golangci/golangci-lint/issues/4782)) - [`2042b1f`](https://togithub.com/golangci/golangci-lint/commit/2042b1f1) build(deps): bump go-simpler.org/sloglint from 0.7.0 to 0.7.1 ([#4784](https://togithub.com/golangci/golangci-lint/issues/4784)) - [`327a78a`](https://togithub.com/golangci/golangci-lint/commit/327a78a8) build(deps): bump golang.org/x/tools from 0.21.0 to 0.22.0 ([#4802](https://togithub.com/golangci/golangci-lint/issues/4802)) - [`e1a8055`](https://togithub.com/golangci/golangci-lint/commit/e1a80557) fix: SARIF format require issue column >= 1 ([#4775](https://togithub.com/golangci/golangci-lint/issues/4775)) - [`88f60c8`](https://togithub.com/golangci/golangci-lint/commit/88f60c8c) fix: gomnd deprecated configuration compatibility ([#4768](https://togithub.com/golangci/golangci-lint/issues/4768)) - [`8173166`](https://togithub.com/golangci/golangci-lint/commit/81731668) fix: init empty result slice for SARIF printer ([#4758](https://togithub.com/golangci/golangci-lint/issues/4758)) - [`02740ea`](https://togithub.com/golangci/golangci-lint/commit/02740ea1) intrange: add style preset ([#4797](https://togithub.com/golangci/golangci-lint/issues/4797)) - [`615b873`](https://togithub.com/golangci/golangci-lint/commit/615b873d) unparam: bump to HEAD ([#4786](https://togithub.com/golangci/golangci-lint/issues/4786)) ### [`v1.59.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1590) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.58.2...v1.59.0) 1. Enhancements - Add SARIF output format - Allow the analysis of generated files (`issues.exclude-generated: disable`) 2. Updated linters - `errcheck`: fix deprecation warning - `go-critic`: from 0.11.3 to 0.11.4 - `gosec`: from 2.20.0 to [`5f0084e`](https://togithub.com/golangci/golangci-lint/commit/5f0084eb01a9) (fix G601 and G113 performance issues) - `sloglint`: from 0.6.0 to 0.7.0 (new option `forbidden-keys`) - `testifylint`: from 1.2.0 to 1.3.0 (new checker `negative-positive` and new option `go-require.ignore-http-handlers`) 3. Misc. - ️️⚠️ Deprecate `github-action` output format - ️️⚠️ Deprecate `issues.exclude-generated-strict` option (replaced by `issues.exclude-generated: strict`) - ️️⚠️ Add warning about disabled and deprecated linters (level 2) ### [`v1.58.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1582) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.58.1...v1.58.2) 1. Updated linters - `canonicalheader`: from 1.0.6 to 1.1.1 - `gosec`: from 2.19.0 to 2.20.0 - `musttag`: from 0.12.1 to 0.12.2 - `nilnil`: from 0.1.8 to 0.1.9 2. Documentation - Improve integrations and install pages ### [`v1.58.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1581) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.58.0...v1.58.1) 1. Updated linters - `tagalign`: from 1.3.3 to 1.3.4 - `protogetter`: from 0.3.5 to 0.3.6 - `gochecknoinits`: fix analyzer name 2. Fixes - Restores previous `gihub-actions` output format (removes GitHub Action problem matchers) ### [`v1.58.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1580) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.2...v1.58.0) 1. New linters - `fatcontext`: https://github.com/Crocmagnon/fatcontext - `canonicalheader`: https://github.com/lasiar/canonicalheader 2. Updated linters - `copyloopvar`: from 1.0.10 to 1.1.0 (`ignore-alias` is replaced by `check-alias` with the opposite behavior) - `decorder`: from 0.4.1 to 0.4.2 - `errname`: from 0.1.12 to 0.1.13 - `errorlint`: from 1.4.8 to 1.5.1 (new options `allowed-errors` and `allowed-errors-wildcard`) - `execinquery`: deprecate linter ⚠️ - `gci`: from 0.12.3 to 0.13.4 (new section `localModule`) - `gocritic`: from 0.11.2 to 0.11.3 - `spancheck`: from 0.5.3 to 0.6.1 - `goerr113` is replaced by `err113` ⚠️ - `gomnd` is replaced by `mnd` ⚠️ - `gomodguard`: from 1.3.1 to 1.3.2 - `grouper`: from 1.1.1 to 1.1.2 - `intrange`: from 0.1.1 to 0.1.2 - `mirror`: from 1.1.0 to 1.2.0 - `misspell`: from 0.4.1 to 0.5.1 - `musttag`: from 0.9.0 to 0.12.1 - `nilnil`: from 0.1.7 to 0.1.8 - `nonamedreturns`: from 1.0.4 to 1.0.5 - `promlinter`: from 0.2.0 to 0.3.0 - `sloglint`: from 0.5.0 to 0.6.0 - `unparam`: bump to HEAD ([`063aff9`](https://togithub.com/golangci/golangci-lint/commit/063aff900ca150b80930c8de76f11d7e6488222f)) - `whitespace`: from 0.1.0 to 0.1.1 3. Enhancements - Speed up "fast" linters when only "fast" linters are run: between 40% and 80% faster at first run (i.e. without cache) 4. Fixes - Use version with module plugins - Skip `go.mod` report inside autogenerated processor - Keep only `typecheck` issues when needed - Don't hide `typecheck` errors inside diff processor 5. Misc. - ⚠️ log an error when using previously deprecated linters ([Linter Deprecation Cycle](https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle)) - [`deadcode`](https://togithub.com/remyoudompheng/go-misc/tree/master/deadcode): deprecated since v1.49.0 (2022-08-23). - [`exhaustivestruct`](https://togithub.com/mbilski/exhaustivestruct): deprecated since v1.46.0 (2022-05-08). - [`golint`](https://togithub.com/golang/lint): deprecated since v1.41.0 (2021-06-15). - [`ifshort`](https://togithub.com/esimonov/ifshort): deprecated since v1.48.0 (2022-08-04). - [`interfacer`](https://togithub.com/mvdan/interfacer): deprecated since v1.38.0 (2021-03-03). - [`maligned`](https://togithub.com/mdempsky/maligned): deprecated since v1.38.0 (2021-03-03). - [`nosnakecase`](https://togithub.com/sivchari/nosnakecase): deprecated since v1.48.0 (2022-08-04). - [`scopelint`](https://togithub.com/kyoh86/scopelint): deprecated since v1.39.0 (2021-03-25). - [`structcheck`](https://togithub.com/opennota/check): deprecated since v1.49.0 (2022-08-23). - [`varcheck`](https://togithub.com/opennota/check): deprecated since v1.49.0 (2022-08-23). - ⚠️ Deprecate usage of linter alternative names - Remove help display on errors with `config verify` command - Add `pre-commit` hook to run `config verify` - Improve `github-action` output 6. Documentation - Remove deprecated Atom from Editor Integrations GitHub Action (v5.1.0) for golangci-lint: - supports for `pull`, `pull_request_target`, and `merge_group` events with the option `only-new-issues`. - ️️⚠️ `skip-pkg-cache` and `skip-build-cache` have been removed because the cache related to Go itself is already handled by `actions/setup-go`. - with golangci-lint v1.58, the file information (path and position) will be displayed on the log. ### [`v1.57.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1572) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.1...v1.57.2) 1. Updated linters - `contextcheck`: from 1.1.4 to 1.1.5 - `copyloopvar`: from 1.0.8 to 1.0.10 - `ginkgolinter`: from 0.16.1 to 0.16.2 - `goconst`: from 1.7.0 to 1.7.1 - `gomoddirectives`: from 0.2.3 to 0.2.4 - `intrange`: from 0.1.0 to 0.1.1 2. Misc. - Display warnings on deprecated linter options - Fix missing `colored-tab` output format - Fix TeamCity `inspectionType` service message 3. Documentation - Remove invalid example about mixing files and directory - Improve linters page ### [`v1.57.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1571) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.0...v1.57.1) 1. Fixes - Ignore issues with invalid position (e.g. `contextcheck`). ### [`v1.57.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1570) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.2...v1.57.0) 1. New linters - `copyloopvar`: https://github.com/karamaru-alpha/copyloopvar - `intrange`: https://github.com/ckaznocha/intrange 2. Updated linters - `dupword`: from 0.0.13 to 0.0.14 - `gci`: from 0.12.1 to 0.12.3 - `ginkgolinter`: from 0.15.2 to 0.16.1 (new option `force-expect-to`, `validate-async-intervals`, and `forbid-spec-pollution`) - `go-critic`: from 0.11.1 to 0.11.2 - `go-critic`: support of `enable-all` and `disable-all` options - `go-spancheck`: from 0.5.2 to 0.5.3 - `gomodguard`: from 1.3.0 to 1.3.1 - `govet`: deprecation of `check-shadowing` ⚠️ - `govet`: disable temporarily `httpresponse` because of a bug [https://github.com/golang/go/issues/66259](https://togithub.com/golang/go/issues/66259) - `misspell`: add `extra-words` - `musttag`: from 0.8.0 to 0.9.0 - `nakedret`: from 2.0.2 to 2.0.4 - `paralleltest`: from 1.0.9 to 1.0.10 - `perfsprint`: from 0.6.0 to 0.7.1 (new option `strconcat`) - `protogetter`: from 0.3.4 to 0.3.5 - `revive`: add `exclude` option - `sloglint`: from 0.4.0 to 0.5.0 (new option `no-global`) - `staticcheck`: from 0.4.6 to 0.4.7 - `testifylint`: from 1.1.2 to 1.2.0 (new option `bool-compare`) - `unconvert`: to HEAD (new options `fast-math` and `safe`) - `wrapcheck`: from 2.8.1 to 2.8.3 - Disable `copyloopvar` and `intrange` on Go < 1.22 3. Enhancements - 🧩New custom linters system https://golangci-lint.run/plugins/module-plugins/ - Allow running only a specific linter without modifying the file configuration (`--enable-only`) - Allow custom sort order for the reports (`output.sort-order`) - Automatically adjust the maximum concurrency to the container CPU quota if `run.concurrency=0` - Add `config verify` command to check the configuration against the JSON Schema - Option to strictly follow Go generated file convention (`issues.exclude-generated-strict`) - Syntax to not override `severity` from linters (`@linter`) - Use severities from `gosec` - Create automatically directory related to `output.formats.path` - Use the first issue without inline on `mergeLineIssues` on multiple issues 4. Misc. - ⚠️ Inactivate deprecated linters (`deadcode`, `exhaustivestruct`, `golint`, `ifshort`, `interfacer`, `maligned`, `nosnakecase`, `scopelint`, `structcheck`, `varcheck`) - ⚠️ Deprecated CLI flags have been removed (deprecated since 2018) - ⚠️ Move `show-stats` option from `run` to `output` configuration section - ⚠️ Replace `run.skip-xxx` options by `issues.exclude-xxx` options - ⚠️ Replace `output.format` by `output.formats` with a new file configuration syntax - Internal rewrite of the CLI - Improve 'no go files to analyze' message - Use `GOTOOLCHAIN=auto` inside the Docker images 5. Documentation - ⚠️ Define the linter deprecation cycle https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle - 🎉Use information from the previous release to create linter pages - Publish JSON schema on https://golangci-lint.run/jsonschema/golangci.jsonschema.json - Reorganize documentation pages - Add an explanation about the configuration file inside golangci-lint repository **⚠️ Important ⚠️** 1. Deprecated linters are inactivated, you still need to disable them if you are using `enable-all`. 2. Deprecated CLI flags (about linter settings and `deadline`) have been removed. ### [`v1.56.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1562) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.1...v1.56.2) 1. updated linters - `go-critic`: from 0.11.0 to 0.11.1 - `gosec`: from 2.18.2 to 2.19.0 - `testifylint`: from 1.1.1 to 1.1.2 - `usestdlibvars`: from 1.24.0 to 1.25.0 - `wsl`: from 4.2.0 to 4.2.1 2. misc. - Fix missing version in Docker image 3. Documentation - Explain the limitation of `new-from-rev` and `new-from-patch` ### [`v1.56.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1561) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.0...v1.56.1) 1. updated linters - `errcheck`: from 1.6.3 to 1.7.0 - `govet`: disable `loopclosure` with go1.22 - `revive`: from 1.3.6 to 1.3.7 - `testifylint`: from 1.1.0 to 1.1.1 ### [`v1.56.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1560) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.2...v1.56.0) 1. new linters - `spancheck`: https://github.com/jjti/go-spancheck 2. updated linters - `depguard`: from 2.1.0 to 2.2.0 - `exhaustive`: from 0.11.0 to 0.12.0 - `exhaustruct`: from 3.1.0 to 3.2.0 - `gci`: from 0.11.2 to 0.12.1 - `ginkgolinter`: from 0.14.1 to 0.15.2 - `go-check-sumtype`: from 0.1.3 to 0.1.4 - `go-critic`: from 0.9.0 to 0.11.0 - `go-errorlint`: from 1.4.5 to 1.4.8 - `go-spancheck`: from 0.4.2 to 0.5.2 - `goconst`: from 1.6.0 to 1.7.0 - `godot`: from 1.4.15 to 1.4.16 - `gofumpt`: from 0.5.0 to 0.6.0 - `inamedparam`: from 0.1.2 to 0.1.3 - `ineffassign`: from 0.0.0-20230610083614-0e73809eb601 to 0.1.0 - `ireturn`: from 0.2.2 to 0.3.0 - `misspell`: add mode option - `musttag`: from v0.7.2 to v0.8.0 - `paralleltest`: from 1.0.8 to 1.0.9 - `perfsprint`: from 0.2.0 to 0.6.0 - `protogetter`: from 0.2.3 to 0.3.4 - `revive`: from 1.3.4 to 1.3.6 - `sloglint`: add static-msg option - `sloglint`: from 0.1.2 to 0.4.0 - `testifylint`: from 0.2.3 to 1.1.0 - `unparam`: from [`2022122`](https://togithub.com/golangci/golangci-lint/commit/20221223090309)-7455f1af531d to [`2024010`](https://togithub.com/golangci/golangci-lint/commit/20240104100049)-c549a3470d14 - `whitespace`: update after moving to the `analysis` package - `wsl`: from 3.4.0 to 4.2.0 - `zerologlint`: from 0.1.3 to 0.1.5 3. misc. - 🎉 go1.22 support - Implement stats per linter with a flag - Make versioning inside Docker image consistent with binaries - Parse Go RC version 4. Documentation - Fix `noctx` description - Add missing fields to `.golangci.reference.yml` - Improve `.golangci.reference.yml` defaults - `typecheck`: improve FAQ - `exhaustruct`: note that struct regular expressions are expected to match the entire `package/name/structname` - `wrapcheck`: adjust `ignoreSigs` to new defaults **Important** `testifylint` has [breaking changes](https://togithub.com/Antonboom/testifylint/releases/tag/v1.0.0) about enabling/disabling checks: - If you were using the option `enable` with a filtered list of checks, you should either add `disable-all: true` (1) or use `disable` field (2). ```yml ``` ### Example (1) testifylint: disable-all: true enable: - bool-compare - compares - empty - error-is-as - error-nil - expected-actual - go-require - float-compare - len - nil-compare - require-error ### - suite-dont-use-pkg - suite-extra-assert-call - suite-thelper ``` ```yml ### Example (2) testifylint: disable: - suite-dont-use-pkg ``` ### [`v1.55.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1552) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.1...v1.55.2) 1. updated linters - `ireturn`: from 0.2.1 to 0.2.2 - `ginkgolinter`: from 0.14.0 to 0.14.1 ### [`v1.55.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1551) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.0...v1.55.1) 1. updated linters - `gosec`: from 2.18.1 to 2.18.2 2. misc. - `revgrep`: from v0.5.0 to v0.5.2 (support git < 2.41.0) - output: convert backslashes to forward slashes for GitHub Action annotations printer ### [`v1.55.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1550) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.54.2...v1.55.0) 1. new linters - `gochecksumtype`: https://github.com/alecthomas/go-check-sumtype - `inamedparam`: https://github.com/macabu/inamedparam - `perfsprint`: https://github.com/catenacyber/perfsprint - `protogetter`: https://github.com/ghostiam/protogetter - `sloglint`: https://github.com/go-simpler/sloglint - `testifylint`: https://github.com/Antonboom/testifylint 2. updated linters - `bidichk`: from 0.2.4 to 0.2.7 - `decorder`: from 0.4.0 to 0.4.1 - `dupword`: from 0.0.12 to 0.0.13 - `errchkjson`: from 0.3.1 to 0.3.6 - `gci`: from 0.11.0 to 0.11.2 - `ginkgolinter`: from 0.13.5 to 0.14.0 - `go-errorlint`: from 1.4.4 to 1.4.5 - `gocognit`: from 1.0.7 to 1.1.0 - `goconst`: from 1.5.1 to 1.6.0 - `godot`: from 1.4.14 to 1.4.15 - `gofmt`: update to HEAD - `goimports`: update to HEAD - `gosec`: from 2.17.0 to 2.18.1 - `gosmopolitan`: from 1.2.1 to 1.2.2 - `govet`: add `appends` analyzer - `ireturn`: from 0.2.0 to 0.2.1 - `protogetter`: from 0.2.2 to 0.2.3 - `revgrep`: from [`745bb2f`](https://togithub.com/golangci/golangci-lint/commit/745bb2f7c2e6) to v0.5.0 - `revive`: from 1.3.2 to 1.3.4 - `sqlclosecheck`: from 0.4.0 to 0.5.1 - `staticcheck`: from 0.4.5 to 0.4.6 - `tagalign`: from 1.3.2 to 1.3.3 - `unused`: support passing in options 3. misc. - Add a pre-commit hook to check all files 4. Documentation - add source options to exclude-rules docs - `gosec`: add G602 to includes/excludes inside .golangci.reference.yml ### [`v1.54.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1542) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.54.1...v1.54.2) 1. updated linters: - `errname`: from 0.1.10 to 0.1.12 - `ginkgolinter`: from 0.13.3 to 0.13.5 - `go-errorlint`: from 1.4.3 to 1.4.4 - `godot`: from 1.4.11 to 1.4.14 - `gosec`: from 2.16.0 to 2.17.0 - `musttag`: from 0.7.1 to 0.7.2 - `nilnil`: from 0.1.5 to 0.1.7 - `staticcheck`: from 0.4.3 to 0.4.5 - `usestdlibvars`: from 1.23.0 to 1.24.0 - `govet`: add missing `directive` and `slog` passes ### [`v1.54.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1541) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.54.0...v1.54.1) 1. updated linters: - `go-critic`: from 0.8.2 to 0.9.0 2. misc. - plugin: temporarily hide warning about using plugins using the old API ### [`v1.54.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1540) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.53.3...v1.54.0) 1. updated linters: - `decorder`: from 0.2.3 to 0.4.0 - `dupword`: from 0.0.11 to 0.0.12 - `errorlint`: from 1.4.2 to 1.4.3 - `exhaustruct`: from 2.3.0 to 3.1.0 - `forbidigo`: from 1.5.3 to 1.6.0 - `funlen`: from 0.0.3 to 0.1.0 - `gci`: from 0.10.1 to 0.11.0 - `ginkgolinter`: from 0.12.1 to 0.13.3 - `go-critic`: from 0.8.1 to 0.8.2 - `go-errorlint`: from 1.4.2 to 1.4.3 - `go-exhaustruct`: from 2.3.0 to 3.1.0 - `gocognit`: from 1.0.6 to 1.0.7 - `gocritic`: from 0.8.1 to 0.8.2 - `gofmt`: autofix missing newline at EOF - `misspell`: 0.4.0 to 0.4.1 - `musttag`: from 0.7.0 to 0.7.1 - `paralleltest`: from 1.0.7 to 1.0.8 - `tagalign`: from 1.2.2 to 1.3.2 - `typecheck`: explain it and remove it from the linter list - `zerologlint`: from 0.1.2 to 0.1.3 2. misc. - 🎉 go1.21 support - plugin: include custom linters in `enable-all` - plugin: allow to use settings for plugins 3. Documentation - Add linter descriptions. **Important** `ruleguard` (a "rule" inside `gocritic`) was disabled in this release (v1.54.0) and was enabled again in the next release (v1.54.1). `exhaustruct` has breaking changes with regular expressions, more details [here](https://togithub.com/GaijinEntertainment/go-exhaustruct/releases/tag/v3.0.0). ### [`v1.53.3`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1533) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.53.2...v1.53.3) 1. updated linters: - `cyclop`: from 1.2.0 to 1.2.1 - `exhaustive`: from 0.10.0 to 0.11.0 - `forbidigo`: from 1.5.1 to 1.5.3 - `ginkgolinter`: from 0.12.2 to 0.12.1 - `ineffassign`: bump to HEAD - `nakedret`: from 2.0.1 to 2.0.2 - `zerologlint`: from 0.1.1 to 0.1.2 2. misc. - codeclimate: reduce memory allocation - support illumos/amd64 ### [`v1.53.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1532) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.53.1...v1.53.2) 1. updated linters - `depguard`: from v2.0.1 to 2.1.0 2. misc. - `depguard`: throw error only when the linter is called ### [`v1.53.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1531) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.53.0...v1.53.1) 1. misc. - `depguard`: fix GOROOT detection - `importas`: fix duplication detection when aliases use regular expression replacement pattern ### [`v1.53.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1530) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.52.2...v1.53.0) 1. new linters - `gosmopolitan`: https://github.com/xen0n/gosmopolitan - `mirror`: https://github.com/butuzov/mirror - `tagalign`: https://github.com/4meepo/tagalign - `zerologlint`: https://github.com/ykadowak/zerologlint 2. updated linters - `bodyclose`: bump to HEAD - `containedctx`: from 1.0.2 to 1.0.3 - `depguard`: migrate to v2 - `errname`: from 0.1.9 to 0.1.10 - `exhaustive`: from 0.9.5 to 0.10.0 - `forbidigo`: better support for configuring complex rules - `gci`: improve error message - `ginkgolinter`: add suppress-async-assertion option - `ginkgolinter`: from 0.9.0 to 0.12.0 - `go-critic`: from 0.7.0 to 0.8.1 - `go-errorlint`: from 1.4.0 to 1.4.2 - `gofumpt`: from 0.4.0 to 0.5.0 - `gosec`: convert global settings as map with proper key type - `gosec`: from 2.15.0 to 2.16.0 - `importas`: detect duplicate alias or package in the configuration - `importas`: fix typo in logs - `ireturn`: from 0.1.1 to 0.2.0 - `musttag`: from 0.5.0 to 0.7.0 - `nakedret`: to 2.0.1 - `nilnil`: from 0.1.3 to 0.1.5 - `paralleltest`: from 1.0.6 to 1.0.7 - `revive`: from 1.3.1 to 1.3.2 - `tagliatelle`: from 0.4.0 to 0.5.0 - `usestdlibvars`: fix configuration 3. misc. - `golang.org/x/tools`: from 0.7.0 to 0.9.2 - add loongarch64 to the install script - output: add colored-tab - remove warning when the config file is explicitly stdin - rules: support inverted path match 4. Documentation - `mnd`: clarify ignore usage examples to be regexps - `tagliatelle`: update documentation - improve features section - update supported Go versions FAQ ### [`v1.52.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1522) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.52.1...v1.52.2) 1. updated linters - `tparallel`: from 0.3.0 to 0.3.1 2. misc. - fix: pre-commit `require_serial` and `pass_filenames` ### [`v1.52.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1521) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.52.0...v1.52.1) 1. misc. - fix: improve panic management - fix: the combination of --fix and --path-prefix ### [`v1.52.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1520) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.51.2...v1.52.0) 1. updated linters - `asciicheck`: from 0.1.1 to 0.2.0 - `bidichk`: from 0.2.3 to 0.2.4 - `contextcheck`: from 1.1.3 to 1.1.4 - `dupword`: from 0.0.9 to 0.0.11 - `durationcheck`: from 0.0.9 to 0.0.10 - `errchkjson`: from 0.3.0 to 0.3.1 - `errname`: from 0.1.7 to 0.1.9 - `forbidigo`: from 1.4.0 to 1.5.1 - `gci`: from 0.9.1 to 0.10.1 - `ginkgolinter`: from 0.8.1 to 0.9.0 - `go-critic`: from 0.6.7 to 0.7.0 - `go-errorlint`: from 1.1.0 to 1.4.0 - `godox`: bump to HEAD - `lll`: skip go command - `loggercheck`: from 0.9.3 to 0.9.4 - `musttag`: from 0.4.5 to 0.5.0 - `nilnil`: from 0.1.1 to 0.1.3 - `noctx`: from 0.0.1 to 0.0.2 - `revive`: from 1.2.5 to 1.3.1 - `rowserrcheck`: remove limitation related to generics support - `staticcheck`: from 0.4.2 to 0.4.3 - `testpackage`: from 1.1.0 to 1.1.1 - `tparallel`: from 0.2.1 to 0.3.0 - `wastedassign`: remove limitation related to generics support - `wrapcheck`: from 2.8.0 to 2.8.1 2. misc. - Add TeamCity output format - Consider path prefix when matching path patterns - Add Go version to version information 3. Documentation - Add Tekton in Trusted By page - Clarify that custom linters are not enabled by default - Remove description for deprecated "go" optionConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate. View repository job log here.