GoLand 2026.2 Help

Configuring golangci-lint

GoLand provides functionality to work with golangci-lint. You can configure it to analyze and improve your Go code by enabling or disabling specific linters. In the terminology of GoLand, linters are inspections that detect problematic code in your project before you run it.

With GoLand, you can also use your golangci-lint configuration files to check your code in your CI pipeline and run the same linters in the IDE.

Configuring golangci-lint

Enable the Go Linter plugin

This functionality relies on the Go Linter plugin, which is bundled and enabled in GoLand by default. If the relevant features are not available, make sure that you did not disable the plugin.

  1. Press Ctrl+Alt+S to open settings and then select Plugins.

  2. Open the Installed tab, find the Go Linter plugin, and select the checkbox next to the plugin name.

Set the executable path for golangci-lint

  1. Press Ctrl+Alt+S to open settings and then select Go | Linters.

  2. From the Executable list, select the path to the golangci-lint executable.

    If the path is not detected automatically, click the plus icon and choose one of the following options:

    • Browse: use the file browser to select the path to the golangci-lint executable.

    • Download: download and install the golangci-lint executable to a directory accessible to your user.

    Set the executable path for golangci-lint

Set the number of concurrent processes

  1. Press Ctrl+Alt+S to open settings and then select Go | Linters.

  2. In the Concurrency field, enter the number of workers that golangci-lint can run at the same time. The IDE passes this value to golangci-lint as the -j option.

Enable or disable specific linters

  1. Press Ctrl+Alt+S to open settings and then select Go | Linters.

  2. Review the list of linters in the table.

  3. Select the checkbox next to a linter to enable it, or clear the checkbox to disable it.

Format files with golangci-lint

  1. Press Ctrl+Alt+S to open settings and then select Go | Linters.

  2. Select Execute 'golangci-lint fmt' to format files when you save them. This option requires golangci-lint version 2 or later.

  3. On the Formatters tab, select the formatters to use. If you select Use config, the configuration file defines the formatters.

Use a custom configuration file for golangci-lint

  1. Press Ctrl+Alt+S to open settings and then select Go | Linters.

  2. Select the Use config checkbox.

  3. Specify the path to your custom configuration file in the input field.

    When a configuration file is selected, the Linters and Formatters tables become disabled. The IDE uses the settings, linters, and formatters defined in the configuration file.

    To edit the configuration file in the editor, click Edit. The configuration file is opened in the editor.

    Use a custom configuration file for golangci-lint

Adjust severity levels for linters

  1. Press Ctrl+Alt+S to open settings and then select Go | Linters.

  2. Click Configure severity to open the Inspections settings page, where you can adjust the severity levels for golangci-lint checks.

    For more information about severity levels, refer to Change inspection severity.

    Adjust severity levels for linters

Using results of golangci-lint in the editor

The results of golangci-lint linters are highlighted in the editor based on the configured severity levels.

Linters are highlighted in the editor

To view the results of golangci-lint linters, click the Problems widget. The detected issues will appear in the Problems tool window.

Using results of golangci-lint in the editor

Running golangci-lint in the terminal

  1. From the main menu, select View | Tool Windows | Terminal.

  2. In the Terminal tool window, type:

    golangci-lint run
    Running golangci-lint in the terminal
09 October 2025