You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
don't forget about `mapstructure` tag for proper configuration files parsing by [pflag](https://github.com/spf13/pflag).
36
-
5. Take a look at the example of [Pull Request with new linter support](https://github.com/golangci/golangci-lint/pulls?q=is%3Apr+is%3Amerged+label%3A%22linter%3A+new%22).
42
+
5. Take a look at the example of [pull requests with new linter support](https://github.com/golangci/golangci-lint/pulls?q=is%3Apr+is%3Amerged+label%3A%22linter%3A+new%22).
37
43
38
44
## How to add a private linter to `golangci-lint`
39
45
@@ -43,7 +49,9 @@ Typically, these linters can't be open-sourced or too specific.
43
49
Such linters can be added through Go's plugin library.
44
50
45
51
For a private linter (which acts as a plugin) to work properly,
46
-
the plugin as well as the golangci-lint binary needs to be built for the same environment. `CGO_ENABLED` is another requirement.
52
+
the plugin as well as the golangci-lint binary **needs to be built for the same environment**.
53
+
54
+
`CGO_ENABLED` is another requirement.
47
55
48
56
This means that `golangci-lint` needs to be built for whatever machine you intend to run it on
49
57
(cloning the golangci-lint repository and running a `CGO_ENABLED=1 make build` should do the trick for your machine).
@@ -65,6 +73,12 @@ If you're looking for instructions on how to configure your own custom linter, t
0 commit comments