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
Improve instructions for vendoring golangci-lint in FAQ section of README
The section on vendoring golangci-lint fails to mention that it should be added
to the required section in Gopkg.toml. Without this section, the vendored
golangci-lint would be deleted on the next dep ensure -update. Also, some of the
wording was a bit awkward.
Copy file name to clipboardExpand all lines: README.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -362,14 +362,24 @@ By doing this you won't create new issues in code and can smoothly fix existing
362
362
363
363
A: You have 2 choices:
364
364
1. Use [GolangCI](https://golangci.com): this service is highly integrated with GitHub (issues are commented in the pull request) and uses a `golangci-lint` tool. For configuration use `.golangci.yml` (or toml/json).
365
-
2. Use custom CI: just run `golangci-lint` in CI and check exit code. If it's non-zero - fail the build. The main disadvantage is that you can't see found issues in pull request code and should view build log, then open needed source file to see a context.
366
-
If you'd like to vendor `golangci-lint`to fix it's version run:
365
+
2. Use custom CI: just run `golangci-lint` in CI and check the exit code. If it's non-zero - fail the build. The main disadvantage is that you can't see found issues in pull request code and should view build log, then open needed source file to see a context.
366
+
If you'd like to vendor `golangci-lint`in your repo, run:
367
367
```bash
368
368
go get -u github.com/golang/dep/cmd/dep
369
369
dep init
370
370
dep ensure -v -add github.com/golangci/golangci-lint/cmd/golangci-lint
371
371
```
372
-
And in CI run next command to install vendored `golangci-lint`: `go install ./vendor/github.com/golangci/golangci-lint/cmd/golangci-lint/`.
372
+
Then add these lines to your `Gopkg.toml` file, so `dep ensure -update` won't delete the vendored `golangci-lint` code.
0 commit comments