docs: add FAQ entry about go install
This commit is contained in:
parent
1ff1d6733f
commit
6e12ea5734
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
|||||||
test:
|
test:
|
||||||
go install ./cmd/...
|
go install -i ./cmd/... # needed for govet and golint
|
||||||
golangci-lint run -v
|
golangci-lint run -v
|
||||||
golangci-lint run --fast --no-config -v
|
golangci-lint run --fast --no-config -v
|
||||||
golangci-lint run --no-config -v
|
golangci-lint run --no-config -v
|
||||||
|
@ -255,7 +255,7 @@ Flags:
|
|||||||
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
|
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
|
||||||
|
|
||||||
# golint: Annoying issue about not having a comment. The rare codebase has such comments
|
# golint: Annoying issue about not having a comment. The rare codebase has such comments
|
||||||
- (comment on exported (method|function)|should have( a package)? comment|comment should be of the form)
|
- (comment on exported (method|function|type)|should have( a package)? comment|comment should be of the form)
|
||||||
|
|
||||||
# golint: False positive when tests are defined in package 'test'
|
# golint: False positive when tests are defined in package 'test'
|
||||||
- func name will be used as test\.Test.* by other packages, and that stutters; consider calling this
|
- func name will be used as test\.Test.* by other packages, and that stutters; consider calling this
|
||||||
@ -403,6 +403,11 @@ go install ./vendor/github.com/golangci/golangci-lint/cmd/golangci-lint/`
|
|||||||
```
|
```
|
||||||
Vendoring `golangci-lint` saves a network request, potentially making your CI system a little more reliable.
|
Vendoring `golangci-lint` saves a network request, potentially making your CI system a little more reliable.
|
||||||
|
|
||||||
|
**Q: `govet` or `golint` reports false-positives or false-negatives**
|
||||||
|
These linters obtain type information from installed package files.
|
||||||
|
The same issue you will encounter if will run `govet` or `golint` without `golangci-lint`.
|
||||||
|
Try `go install -i ./...` (or `go install -i ./cmd/...`: depends on the project) first.
|
||||||
|
|
||||||
**Q: `golangci-lint` doesn't work**
|
**Q: `golangci-lint` doesn't work**
|
||||||
1. Update it: `go get -u github.com/golangci/golangci-lint/cmd/golangci-lint`
|
1. Update it: `go get -u github.com/golangci/golangci-lint/cmd/golangci-lint`
|
||||||
2. Run it with `-v` option and check the output.
|
2. Run it with `-v` option and check the output.
|
||||||
|
@ -275,6 +275,11 @@ go install ./vendor/github.com/golangci/golangci-lint/cmd/golangci-lint/`
|
|||||||
```
|
```
|
||||||
Vendoring `golangci-lint` saves a network request, potentially making your CI system a little more reliable.
|
Vendoring `golangci-lint` saves a network request, potentially making your CI system a little more reliable.
|
||||||
|
|
||||||
|
**Q: `govet` or `golint` reports false-positives or false-negatives**
|
||||||
|
These linters obtain type information from installed package files.
|
||||||
|
The same issue you will encounter if will run `govet` or `golint` without `golangci-lint`.
|
||||||
|
Try `go install -i ./...` (or `go install -i ./cmd/...`: depends on the project) first.
|
||||||
|
|
||||||
**Q: `golangci-lint` doesn't work**
|
**Q: `golangci-lint` doesn't work**
|
||||||
1. Update it: `go get -u github.com/golangci/golangci-lint/cmd/golangci-lint`
|
1. Update it: `go get -u github.com/golangci/golangci-lint/cmd/golangci-lint`
|
||||||
2. Run it with `-v` option and check the output.
|
2. Run it with `-v` option and check the output.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user