Table of Contents
💡 Feature Requests
Please file an issue to suggest new features. Vote on feature requests by adding a 👍. This helps maintainers prioritize what to work on.
🐛 Bugs
Please file an issue for bugs, missing documentation, or unexpected behavior.
Thanks
Thanks to all contributors! Thanks to alecthomas/gometalinter for inspiration and amazing work. Thanks to bradleyfalzon/revgrep for cool diff tool.
Thanks to developers and authors of used linters:
- tdakkota
- breml
- timakin
- sivchari
- sylvia7788
- bkielbasa
- remyoudompheng
- OpenPeeDeeP
- alexkohler
- mibk
- charithe
- kisielk
- Antonboom
- polyfloyd
- nishanths
- mbilski
- kyoh86
- ashanbrown
- gostaticanalysis
- ultraware
- daixiang0
- leighmcculloch
- uudashr
- jgautheron
- go-critic
- fzipp
- tetafro
- matoous
- Djarvur
- mvdan
- denis-tingajkin
- golang
- tommy-muehle
- ldez
- ryancurrah
- jirfag
- securego
- dominikh
- leonklingele
- esimonov
- julz
- gordonklaus
- butuzov
- yagipy
- mdempsky
- client9
- nakabonne
- ssgreg
- sonatard
- kunwardeep
- yeya24
- mgechev
- jingyugao
- ryanrolds
- opennota
- maratori
- kulti
- moricho
- blizzy78
- sanposhiho
- tomarrell
- bombsimon
- golangci
Changelog
Follow the news and releases on our twitter and our blog. There is the most valuable changes log:
v1.44.1
- updated linters:
bidichk: from 0.2.1 to 0.2.2errchkjson: from 0.2.1 to 0.2.3thelper: from 0.5.0 to 0.5.1tagliatelle: from 0.3.0 to 0.3.1gopsutil: from 3.21.12 to 3.22.1gci: from 0.2.9 to 0.3.0revive: from v1.1.3 to v1.1.4varnamelen: from v0.5.0 to v0.6.0
- documentation:
- linters: improve configuration pages
decorder: fixdisable-init-func-first-check: falseelaboration
- misc:
- fix debug output
v1.44.0
- new linters:
containedctx: https://github.com/sivchari/containedctxdecorder: https://gitlab.com/bosi/decordererrchkjson: https://github.com/breml/errchkjsonmaintidx: https://github.com/yagipy/maintidxgrouper: https://github.com/leonklingele/grouper
- updated linters:
asciicheck: bump to v0.1.1bidichk: from 0.1.1 to 0.2.1bodyclose: bump to HEADdecorder: from 0.2.0 to 0.2.1depguard: from 1.0.1 to 1.1.0errchkjson: from 0.2.0 to 0.2.1errorlint: bump to HEADexhaustive: drop deprecated/unused settingsexhaustive: from v0.2.3 to 0.7.11forbidigo: from 1.2.0 to 1.3.0forcetypeassert: bump to v0.1.0gocritic: from 0.6.1 to 0.6.2gocritic: support autofixgocyclo: from 0.3.1 to 0.4.0godot: add period optiongofumpt: from 0.1.1 to 0.2.1gomnd: from 2.4.0 to 2.5.0gomnd: new configurationgosec: from 2.9.1 to 2.9.6ifshort: from 1.0.3 to 1.0.4ineffassign: bump to HEADmakezero: to v1.1.0promlinter: from v0.1.0 to HEADrevive: fixenableAllRulesrevive: from 1.1.2 to 1.1.3staticcheck: from 0.2.1 to 0.2.2tagliatelle: from 0.2.0 to 0.3.0thelper: from 0.4.0 to 0.5.0unparam: bump to HEADvarnamelen: bump to v0.5.0wrapcheck: update configuration to includeignoreSignRegexps
- documentation:
- linters: improve pages about configuration
- improve page about false-positive
nolintlint: fix wrong default value in commentrevive: add a more detailed configuration
- misc:
- outputs: Add support for multiple outputs
- outputs: Print error text in
<failure>tag content for more readable JUnit output - outputs: ensure that the Issues key in JSON format is a list
- Return error if any linter fails to run
- cli: Show deprecated mark in the CLI linters help
November 2021
- new linters:
bidichk: https://github.com/breml/bidichk
- update linters:
nestif: from 0.3.0 to 0.3.1rowserrcheck: from 1.1.0 to 1.1.1gopsutil: from 3.21.9 to 3.21.10wrapcheck: from 2.3.1 to 2.4.0gocritic: add support for variable substitution inruleguardpath settings
- documentation:
- improve
go-criticdocumentation - improve
nolintlintdocumentation
- improve
- Misc:
- cli: don't hide
enable-alloption
- cli: don't hide
october 2021
- new linters:
contextcheck: https://github.com/sylvia7788/contextcheckvarnamelen: https://github.com/blizzy78/varnamelen
- update linters:
gochecknoglobals: to v0.1.0gosec: filter issues according to the severity and confidenceerrcheck: empty selector name.ifshort: from 1.0.2 to 1.0.3go-critic: from 0.5.6 to 0.6.0gosec: from 2.8.1 to 2.9.1durationcheck: from 0.0.8 to 0.0.9wrapcheck: from 2.3.0 to 2.3.1revive: from 1.1.1 to 1.1.2
September 2021
- new linters:
- update linters:
errcheck: update to HEADerrname: from 0.1.4 to 0.1.5gci: Parse the settings more similarly to the CLIgodot: from 1.4.9 to 1.4.11ireturn: from 0.1.0 to 0.1.1nlreturn: add block-size optionparalleltest: from 1.0.2 to 1.0.3
- Misc:
- new-from-rev: add support for finding issues in entire files in a diff
August 2021
- new linters:
errname: https://github.com/Antonboom/errname
- update linters:
errname: from 0.1.3 to 0.1.4go-critic: fix invalid type conversions.godot: from 1.4.8 to 1.4.9gomodguard: from 1.2.2 to 1.2.3revive: from 1.0.9 to 1.1.1staticcheck: bump to 2021.1.1 (v0.2.1)wrapcheck: bump to v2.3.0
- Misc:
- build binaries and Docker images with go1.17
July 2021
- update linters:
errcheck: allow exclude config without extra fileexhaustive: from 0.1.0 to 0.2.3gocognit: from 1.0.1 to 1.0.5godot: from 1.4.7 to 1.4.8gomoddirectives: from 0.2.1 to 0.2.2revive: from 1.0.8 to 1.0.9
- documentation:
- improve
goconstdocumentation - improve
goimportsdescription
- improve
June 2021
- update linters:
durationcheck: from 0.0.7 to 0.0.8gci: from 0.2.8 to 0.2.9goconst: from 0.5.6 to 0.5.7gofumpt: Add lang-version optiongomodguard: from 1.2.1 to 1.2.2gosec: from 2.8.0 to 2.8.1revive: add enable-all-rules.revive: allow to disable rulerevive: fix exclude comment rule for const blockrevive: from 1.0.7 to 1.0.8wrapcheck: from 2.1.0 to 2.2.0
- documentation:
- add all integrations to docs introduction page
- Misc:
- 🎉 Un-deprecate enable-all option
- output: generate HTML report
- Support RISV64
May 2021
- new linters:
tagliatelle: https://github.com/ldez/tagliatellepromlinter: https://github.com/yeya24/promlinter
- update linters:
durationcheck: from 0.0.6 to 0.0.7errorlint: bump to HEADforbidigo: from 1.1.0 to 1.2.0go-critic: from 0.5.5 to 0.5.6godot: from 1.4.6 to 1.4.7- ⚠
golint: deprecated gomnd: from 2.3.2 to 2.4.0gomodguard: fix problem where duplicate issues were reportedgosec: from 2.7.0 to 2.8.0govet: fixsigchanyzergovet: Update vet passesimportas: allow repeated aliasesimportas: bump to HEADmakezero: bump to HEADnolintlint: fix false positiverevive: convert hard coded excludes into default exclude patternsrevive: fix add-constant rule supportrevive: fix excludesrevive: from 1.0.6 to 1.0.7revive: improve 'exported' rule outputrowserrcheck: bump to v1.1.0staticcheck: configuration forstaticcheck,gosimple,stylecheckstaticcheck: from 0.1.3 to 0.1.4staticcheck: from v0.1.4 to v0.2.0wastedassign: from 0.2.0 to 1.0.0wastedassign: from 1.0.0 to v2.0.6wrapcheck: from 1.2.0 to 2.1.0
- documentation:
- improve linters page
exhaustivestructexample explanation- fix pattern of
forbidigoin example config yaml - bump documentation dependencies
- fix typos
- Misc:
- set the minimum Go version to go1.15
- non-zero exit code when a linter produces a panic
April 2021
- new linters:
tagliatelle: https://github.com/ldez/tagliatellepromlinter: https://github.com/yeya24/promlinter
- update linters:
godot: from 1.4.4 to 1.4.6wrapcheck: from 1.0.0 to 1.2.0go-mnd: from 2.3.1 to 2.3.2wsl: from 3.2.0 to 3.3.0revive: from 1.0.5 to 1.0.6importas: bump to HEADstaticcheck: configurable Go versiongosec: add configurationtypecheck: improve error stack parsing
- documentation:
- bump documentation dependencies
- fix typos
- Misc:
- fix: comma in exclude pattern leads to unexpected results
March 2021
- new linters:
gomoddirectives: https://github.com/ldez/gomoddirectives
- update linters:
go-critic: from 0.5.4 to 0.5.5gofumpt: from v0.1.0 to v0.1.1gosec: from 2.6.1 to 2.7.0ifshort: bump to v1.0.2importas: bump to HEADmakezero: bump to HEADnolintlint: allow to fix //nolint linesrevive: from 1.0.3 to 1.0.5revive: the default configuration is only applied when no dedicated configurationrowserrcheck: bump to HEAD- ⚠
scopelint: deprecated staticcheck: from v0.1.2 (2020.2.2) to v0.1.3 (2020.2.3)- 🎉
typecheck: display compilation errors as report instead of error wastedassign: bump to v0.2.0wrapcheck: bump to v1.0.0
- documentation:
- improve linters page (versions, deprecation, and presets)
- add cache directory information
- adding missing format options
- fix typos
- Misc:
- Set
versioncommand output to Stdout - fix linters load mode
- Restore fast linters meaning
- Set
February 2021
- new linters:
durationcheck: https://github.com/charithe/durationcheckrevive: https://github.com/mgechev/revivecyclop: https://github.com/bkielbasa/cyclopwastedassign: https://github.com/sanposhiho/wastedassignimportas: https://github.com/julz/importasnilerr: https://github.com/gostaticanalysis/nilerrforcetypeassert: https://github.com/gostaticanalysis/forcetypeassertgovet: addstringintconvandifaceassert
- update linters:
prealloc: Use upstream versionerrcheck: Use upstream versionineffassign: Use upstream versiongocyclo: Use upstream versiongodotfrom 1.3.2 to 1.4.3exhaustivestructfrom 1.1.0 to 1.2.0forbidigofrom 1.0.0 to 1.1.0thelperfrom 0.2.1 to 0.3.1ruleguard: print error message and exit with non-zero status when parsing error occurs- fix wrong load mode for
asciicheck,exhaustivestruct,exportloopref, andmakezero wsl: bump to v3.2.0durationcheck: from 0.0.4 to 0.0.6staticcheck: from 2020.1.6 to v0.1.2 (2020.2.2)thelperfrom 0.3.1 to 0.4.0bodyclose: bump to HEADgo-err113: bump to HEAD- ⚠
interfacer: deprecated - ⚠
maligned: deprecated (govetfieldalignmentas replacement) govet: use same default linter as go vetgo-printf-func-name: tov0.0.0-20200119135958-7558a9eaa5afgodox: tov0.0.0-20210227103229-6504466cf951asciicheck: tov0.0.0-20200416200610-e657995f937bwrapcheck: tov0.0.0-20201130113247-1683564d9756unparam: tov0.0.0-20210104141923-aac4ce9116a7
- CLI: truncate multiline descriptions
- fix: new-from-rev for a large repository
- Support RelatedInformation for analysis Diagnostic
- use go1.16 to create binaries
- fix: MIPS release
- documentation:
- bump documentation dependencies
- fix
go-headerusage - improve
gocriticdescription - update deprecated hyperlink for Sublime Text plugin
- add docs on using homebrew tap
January 2021
- new linters:
predeclared: https://github.com/nishanths/predeclaredifshort: https://github.com/esimonov/ifshort
- update linters:
go-criticfrom 0.5.2 to 0.5.3thelperfrom 0.1.0 to 0.2.1- Validate
go-criticsettings gofumptto v0.1.0gcito v0.2.8go-mndto v2.3.1gosecfrom 2.5.0 to 2.6.1godotfrom 1.3.2 to 1.4.3ifshortto v1.0.1rowserrcheck: fix reports false positive
- fix: modules-download-mode support
- documentation:
- bump documentation dependencies
December 2020
- new linters:
forbidigo: https://github.com/ashanbrown/forbidigomakezero: https://github.com/ashanbrown/makezerothelper: https://github.com/kulti/thelper
- update linters:
go-headerfrom v0.3.1 to v0.4.2go-mndfrom v2.0.0 to v2.2.0godotfrom v1.3.0 to v1.3.2gcifrom v0.2.4 to v0.2.7gomodguardfrom v1.1.0 to v1.2.0go-errorlintfrom v0.0.0-20201006195004-351e25ade6e3 to v0.0.0-20201127212506-19bd8db6546fgofumptfrom v0.0.0-20200802201014-ab5a8192947d to v0.0.0-20201129102820-5c11c50e9475nolintlintfix comment analysis. (#1571)
- result/processors: treat all non-Go source as special autogenerated files
- throw an error on panic. (#1540)
- resolve custom linters' path relative to config file directory (#1572)
- treat all non-Go source as special autogenerated files
- documentation:
- add settings examples for
gocritic(#1562) - removing reference to no-longer-existing linter-in-the-cloud (#1553)
- add settings examples for
- others:
- bump
gopkg.in/yaml.v2from 2.3.0 to 2.4.0 (#1528) - bump
gatsby-remark-responsive-iframein /docs (#1533) - bump
gatsby-remark-imagesfrom 3.3.29 to 3.6.0 in /docs (#1531) - bump
inifrom 1.3.5 to 1.3.8 in /tools (#1560) - bump
react-headroomfrom 3.0.0 to 3.0.1 in /docs (#1532) - bump
react-livefrom 2.2.2 to 2.2.3 in /docs (#1534) - bump
reactfrom 16.13.1 to 16.14.0 in /docs (#1481) - Fix
forbidigolinter name in reports (#1590)
- bump
November 2020
- new linters:
paralleltest: https://github.com/kunwardeep/paralleltest
- update linters:
godotfrom v0.4.9 to v1.3.0exportloopreffrom v0.1.7 to v0.1.8gosecfrom 2.4.0 to 2.5.0goconstusing upstream https://github.com/jgautheron/goconst
DefaultExcludePatternsshould only be used for specified linter (#1494)- unknown linter breaks //nolint (#1497)
- report all unknown linters at once (#1477)
- CI:
- fix Docker tag for Alpine build
- documentation:
- missing sort-results in the docs (#1514)
- add description of Homebrew's official formula (#1421)
- others:
- bump
golang.org/x/textto v0.3.4 (#1293) - bump
github.com/fatih/colorto from 1.9.0 to 1.10.0 (#1485) - bump
lodashfrom 4.17.15 to 4.17.19 in /.github/peril (#1252) - bump
polishedfrom 3.6.6 to 4.0.3 in /docs (#1482) - bump
gatsby-alias-importsfrom 1.0.4 to 1.0.6 in /docs (#1479) - bump
puppeteerfrom 5.3.1 to 5.4.1 in /docs (#1480) - bump
gatsby-remark-embedderfrom 3.0.0 to 4.0.0 in /docs (#1478)
- bump
October 2020
- new linters:
exhaustivestruct: https://github.com/mbilski/exhaustivestructgo-errorlint: https://github.com/polyfloyd/go-errorlinttparallel: https://github.com/moricho/tparallelwrapcheck: https://github.com/tomarrell/wrapcheck
- update linters:
honnef.co/go/toolsfrom 2020.1.5 to 2020.1.6exhaustivestructfrom v1.0.1 to v1.1.0exhaustiveto v0.1.0gochecknoglobals: use https://github.com/leighmcculloch/gochecknoglobals
- add support for powershell completion (#1408)
- add
.golangci.yamlto list of configuration files searched on startup (#1364) - support for only specifying default severity (#1396)
- documentation:
- mention macports installation procedure on macOS (#1352)
- sort linters (#1451)
- CI:
- add codeQL scanning (#1405)
- fix version details in Docker image (#1471)
- releasing docker image for arm64 (#1383)
- change interval for npm to monthly (#1424)
- others:
- use tag version for cobra (#1458)
- bump
nancyto 1.0.1 (#1410) - bump
gatsby-plugin-catch-linksin /docs (#1415) - bump
gatsby-plugin-mdxfrom 1.2.40 to 1.2.43 in /docs (#1419) - bump
gatsby-plugin-sharpfrom 2.6.31 to 2.6.40 in /docs (#1423) - bump
gatsby-plugin-sitemapfrom 2.4.12 to 2.4.14 in /docs (#1417) - bump
github.com/mattn/go-colorablefrom 0.1.7 to 0.1.8 (#1413) - bump
github.com/sirupsen/logrusfrom 1.6.0 to 1.7.0 (#1412) - bump
github.com/sourcegraph/go-difffrom 0.6.0 to 0.6.1 (#1414) - bump
golangci/golangci-lint-actionfrom v2 to v2.3.0 (#1447) (#1469) - bump
puppeteerfrom 3.3.0 to 5.3.1 in /docs (#1418)
September 2020
- update linters:
godotfrom 0.4.8 to 0.4.9exhaustivefrom v0.0.0-20200708172631-8866003e3856 to v0.0.0-20200811152831-6cf413ae40e0gofumptfrom v0.0.0-20200709182408-4fd085cb6d5f to v0.0.0-20200802201014-ab5a8192947d
- add support for fish completion (#1201)
- documentation:
- fix typo in performance docs (#1350)
- CI:
- prevent macos to be marked as passing upon failure (#1381)
- check only for go.mod file (#1397)
- check if go.mod and go.sum are up to dated (#1377)
- trigger Netlify (#1358)
- others:
- bump
github.com/sourcegraph/go-difffrom 0.5.3 to 0.6.0 (#1353) - bump
github.com/valyala/quicktemplatefrom 1.6.2 to 1.6.3 (#1385) - ignore known dependency failure in nancy (#1378)
- bump
@mdx-js/mdxfrom 1.6.16 to 1.6.18 in /docs (#1401) - bump
gatsbyfrom 2.24.52 to 2.24.65 in /docs (#1400) - bump
gatsby-plugin-canonical-urlsin /docs (#1390) - bump
gatsby-plugin-google-analyticsin /docs (#1388) - bump
gatsby-plugin-manifestfrom 2.4.23 to 2.4.27 in /docs (#1355) - bump
gatsby-plugin-mdxfrom 1.2.35 to 1.2.40 in /docs (#1386) - bump
gatsby-plugin-offlinefrom 3.2.23 to 3.2.27 in /docs (#1368) - bump
gatsby-plugin-sharpfrom 2.6.25 to 2.6.31 in /docs (#1354) - bump
gatsby-plugin-sitemapfrom 2.4.11 to 2.4.12 in /docs (#1344) - bump
gatsby-remark-autolink-headersin /docs (#1387) - bump
gatsby-remark-imagesfrom 3.3.25 to 3.3.28 in /docs (#1345) - bump
gatsby-remark-imagesfrom 3.3.28 to 3.3.29 in /docs (#1365) - bump
gatsby-remark-mermaidfrom 2.0.0 to 2.1.0 in /docs (#1369) - bump
gatsby-source-filesystemin /docs (#1366) - bump
gatsby-source-filesystemin /docs (#1389) - bump
gatsby-transformer-sharpin /docs (#1402) - bump
gatsby-transformer-yamlfrom 2.4.10 to 2.4.11 in /docs (#1367) - bump
node-fetchin /.github/contributors (#1363) - bump
polishedfrom 3.6.5 to 3.6.6 in /docs (#1347)
- bump
August 2020
- new
nlreturnlinter: https://github.com/ssgreg/nlreturn - new
gcilinter: https://github.com/daixiang0/gci - support
latestversion of golangci-lint in golangci-lint-action - update
goseclinter from 2.3.0 to 2.4.0 - update
godotlinter from 0.4.2 to 0.4.8 - update
go-criticfrom 0.5.0 to 0.5.2 (#1307) - update
nlreturnfrom 2.0.1 to 2.0.2 (#1287), 2.0.2 to 2.1.0 (#1327) - update
gcito v0.2.1 (#1292), to v0.2.2 (#1305), to v0.2.4 (#1337), - update
funlenfrom 0.0.2 to 0.0.3 (#1341) - upgrade to golang 1.15 for smaller binary (#1303)
- support short and json formats for version cmd (#1315)
- add home directory to config file search paths (#1325)
- allow for serializing multiple golangci-lint invocations (#1302)
July 2020
gofumptlinter:- update linter
- add
extra-rulesoption - support auto-fixing
- upgrade
exhaustivelinter - upgrade
exportloopreflinter - improve 'no such linter' error message
- sorting result.Issues implementation
- enhancements in CI:
- Run
nancyvalidation for all dependencies - Move dependabot config to
.githubfolder
- Run
- other
- bump
lodashfrom 4.17.15 to 4.17.19 in /tools - bump
golangci/golangci-lint-actionfrom v1.2.2 to v2 - bump
github.com/valyala/quicktemplatefrom 1.5.0 to 1.5.1
- bump
June 2020
- Add new linters:
gofumpt
May 2020
- Add new linters:
nolintlint,goerr113 - Updated linters:
godot,staticcheck - Launch a website
April 2020
- Add new linters:
testpackage,nestif,godot,gomodguard,asciicheck - Add github actions output format
- Update linters:
wsl,gomodguard,gosec - Support
disabled-tagssetting forgocritic - Mitigate OOM and "failed prerequisites"
- Self-isolate due to unexpected pandemics
- Support case-sensitive excludes
- Allow granular re-enabling excludes by ID, e.g.
EXC0002
September 2019
- Support go1.13
- Add new linters:
funlen,whitespace(with auto-fix) andgodox - Update linters:
gochecknoglobals,scopelint,gosec - Provide pre-built binary for ARM and FreeBSD
- Fix false-positives in
unused
- Fix false-positives in
- Support
--skip-dirs-use-default - Add support for bash completions
July 2019
- Fix parallel writes race condition
- Update bodyclose with fixed panic
June 2019
- Treat Go source files as a plain text by
misspell: it allows detecting issues in strings, variable names, etc. - Implement richer and more stable auto-fix of
misspellissues.
May 2019
- Add bodyclose linter.
- Support junit-xml output.
April 2019
- Update go-critic, new checkers were added: badCall, dupImports, evalOrder, newDeref
- Fix staticcheck panic on packages that do not compile
- Make install script work on Windows
- Fix compatibility with the latest x/tools version and update golang.org/x/tools
- Correct import path of module sourcegraph/go-diff
- Fix
max-issues-per-lintername - Fix linting of preprocessed files (e.g.
*.qtpl.go, goyacc) - Enable auto-fixing when running via pre-commit
March 2019
- Support the newest
go vet(withgo/analysis) - Support configuration of
go vet: e.g. you can set print functions bylinters-settings.govet.settings.printf.funcs - Update megacheck (staticcheck) to 2019.1.1
- Add information about controlling space-time trade-off into README
- Exclude issues by source code line regexp by
issues.exclude-rules[i].source - Build and test on go 1.12
- Support
--coloroption - Update x/tools to fix c++ issues
- Include support for log level
- Sort linters list in help commands
Future Plans
- Upstream all changes of forked linters.
- Make it easy to write own linter/checker: it should take a minimum code, have perfect documentation, debugging and testing tooling.
- Speed up SSA loading: on-disk cache and existing code profiling-optimizing.
- Analyze (don't only filter) only new code: analyze only changed files and dependencies, make incremental analysis, caches.
- Smart new issues detector: don't print existing issues on changed lines.
- Minimize false-positives by fixing linters and improving testing tooling.
- Automatic issues fixing (code rewrite, refactoring) where it's possible.
- Documentation for every issue type.