Home

Awesome

This plugin is moved to JetBrains https://plugins.jetbrains.com/plugin/12496-go-linter. May the 4th be with you Gophers!

Publish Issues License Version #Download

Intellij/Goland Linter Inspection Plugin

Write code, write better code
All credit goes to GolangCI-Lint authors.

================================

Heads up!

In case of warning: Please make sure no syntax or config error
Please run go mod tidy to refresh deps

How to use

After the plugin installed, you will see a popup on IDEA startup, otherwise please go to settings manually:

A golangci-lint executable is required. Choose one from combobox if you already have it in your PATH, or Open... select one from disk, or Get Latest download one from Github release.

If you have your own .golangci.json|.golangci.toml|.golangci.yaml|.golangci.yml config file, the plugin will detect and use it.
Otherwise, select linters you need:

Click OK, you are all set!

Please keep in mind that golangci-lint is a linter tool, it only works if your project could build (no syntax error), or it will report no issue.

Setting Guide

WSL Guide (Windows Subsystem for Linux)

Please make sure GOROOT is set in IDE before config plugin settings.
If you get typecheck error even with successful go build, please install gcc inside WSL:

# Ubuntu/Debian
sudo apt install build-essential
# Arch/Manjaro
sudo pacman -S gcc

# Red Hat/Fedora/CentOS
sudo yum groupinstall 'Development Tools'
# or with dnf
sudo dnf groupinstall 'Development Tools'

For Windows Users

Please disable goimports / gofmt / gci linters. Instead, use Goland or File-Watcher to format your code.
If you still want to use those 3 linters with the plugin, download <a href="http://ftp.gnu.org/gnu/diffutils/">GNU diff</a> & <a href="https://ftp.gnu.org/pub/gnu/libiconv/">GNU LibIconv</a> and put them in system PATH (eg: C:\WINDOWS).

Report Bug