Skip to content

Commit 05fe235

Browse files
committed
Update readme
The `golangci-lint` binary no longer uses vendoring, and no longer has a `make vendor_free_build` command. This updates the README.md to no longer use that command. The default build now works correctly for custom linters.
1 parent 06456a9 commit 05fe235

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Diff for: README.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,23 @@ To use this:
1111

1212
### Create a Copy of `golangci-lint` that Can Run with Plugins
1313

14-
In order to use plugins, you'll need a golangci-lint executable that can run them. The normal version of this project
15-
is built with the vendors option, which breaks plugins that have overlapping dependencies.
14+
In order to use plugins, you'll need a golangci-lint executable that can run them. Plugin dependencies defined in the
15+
`go.mod` file MUST have a matching version (or hash) as the same dependency in th `golangci-lint` binary if the
16+
dependency is used in both. Because of the high probability of this both using the same dependency, it is recommended
17+
to use a locally built binary. To do so:
1618

1719
1. Download [golangci-lint](https://github.com/golangci/golangci-lint) source code
18-
2. From the projects root directory, run `make vendor_free_build`
20+
2. From the projects root directory, run `make`
1921
3. Copy the `golangci-lint` executable that was created to your path, project, or other location
2022

2123
### Configure Your Project for Linting
2224

23-
If you already have a linter plugin available, you can follow these steps to define it's usage in a projects
24-
`.golangci.yml` file. An example linter can be found at [here](https://github.com/golangci/example-plugin-linter). If you're looking for
25-
instructions on how to configure your own custom linter, they can be found further down.
25+
If you already have a linter plugin available, you can follow these steps to define its usage in a projects
26+
`.golangci.yml` file. If you're looking for instructions on how to configure your own custom linter, they can be found
27+
further down.
2628

27-
1. If the project you want to lint does not have one already, copy the [.golangci.yml](https://github.com/golangci/golangci-lint/blob/master/.golangci.yml) to the root directory.
29+
1. If the project you want to lint does not have one already, copy the [.golangci.yml](https://github.com/golangci/golangci-lint/blob/master/.golangci.yml)
30+
to the root directory.
2831
2. Adjust the yaml to appropriate `linters-settings:custom` entries as so:
2932
```
3033
linters-settings:

0 commit comments

Comments
 (0)