docs/content/docs/plugins/module-plugins.md
[!TIP] An example linter can be found at here.
.custom-gcl.yml.golangci-lint custom (or golangci-lint custom -v to have logs).linters.settings.custom section with the type module../custom-gcl by default).Requirements:
version: {{< golangci/latest-version >}}
plugins:
# a plugin from a Go proxy
- module: 'github.com/golangci/plugin1'
import: 'github.com/golangci/plugin1/foo'
version: v1.0.0
# a plugin from local source
- module: 'github.com/golangci/plugin2'
path: /my/local/path/plugin2
version: "2"
linters:
default: none
enable:
- foo
settings:
custom:
foo:
type: "module"
description: This is an example usage of a plugin linter.
settings:
message: hello
cmd/golangci-lint/plugins.go.go mod tidy (the module containing the plugin will be imported).make build.linters.settings.custom section with the type module.version: "2"
linters:
default: none
enable:
- foo
settings:
custom:
foo:
type: "module"
description: This is an example usage of a plugin linter.
settings:
message: hello
The configuration file can be validated with the JSON Schema: custom-gcl.jsonschema.json
{{% golangci/embed file=".tmp/.custom-gcl.reference.yml" %}}