Table of Contents
Recommended settings for VS Code are:
"go.lintTool": "golangci-lint","go.lintFlags": ["--fast"]
Using it in an editor without
--fast can freeze your editor.
Golangci-lint automatically discovers
.golangci.yml config for edited file: you don't need to configure it in VS Code settings.
There is a plugin for SublimeLinter.
How to configure:
- Install plugin
- Add File Watcher using existing
- If your version of GoLand does not have the
golangci-lintFile Watcher template you can configure your own and use arguments
run --disable=typecheck $FileDir$.
There are available plugins:
The following plugins support
go-plus supports golangci-lint.
golangci-lint can generate bash, fish, powershell, and zsh completion files.
There are two versions of
bash-completion, v1 and v2. V1 is for Bash 3.2 (which is the default on macOS), and v2 is for Bash 4.1+. The
golangci-lint completion script doesn’t work correctly with bash-completion v1 and Bash 3.2. It requires bash-completion v2 and Bash 4.1+. Thus, to be able to correctly use
golangci-lint completion on macOS, you have to install and use Bash 4.1+ (instructions). The following instructions assume that you use Bash 4.1+ (that is, any Bash version of 4.1 or newer).
brew install bash-completion@2echo 'export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d"' >>~/.bashrcecho '[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"' >>~/.bashrcexec bash # reload and replace (if it was updated) shelltype _init_completion && echo "completion is OK" # verify that bash-completion v2 is correctly installed
golangci-lint bash completion:
echo 'source <(golangci-lint completion bash)' >>~/.bashrcsource ~/.bashrc
See the instructions on
golangci-lint completion <YOUR_SHELL> --help (replace
<YOUR_SHELL> with your favorite one).
See our GitHub Action.Edit this page on GitHub