From 8f6de2c65895749d9ced401cde189d80f41617a0 Mon Sep 17 00:00:00 2001 From: Philip Linell Date: Thu, 12 Jan 2023 14:47:01 +0100 Subject: [PATCH] docs: add note about binary requirement for plugin (#3468) --- docs/src/docs/contributing/new-linters.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/src/docs/contributing/new-linters.mdx b/docs/src/docs/contributing/new-linters.mdx index ec38b267..55f5c4a0 100644 --- a/docs/src/docs/contributing/new-linters.mdx +++ b/docs/src/docs/contributing/new-linters.mdx @@ -41,6 +41,11 @@ Some people and organizations may choose to have custom-made linters run as a pa Typically, these linters can't be open-sourced or too specific. Such linters can be added through Go's plugin library. +For a private linter (which acts as a plugin) to work properly, +the plugin as well as the golangci-lint binary needs to be built for the same environment. `CGO_ENABLED` is another requirement. +This means that `golangci-lint` needs to be built for whatever machine you intend to run it on +(cloning the golangci-lint repository and running a `CGO_ENABLED=1 make build` should do the trick for your machine). + ### Configure a Plugin If you already have a linter plugin available, you can follow these steps to define it's usage in a projects