File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
test :
2
- go install ./cmd/...
2
+ go install -i ./cmd/... # needed for govet and golint
3
3
golangci-lint run -v
4
4
golangci-lint run --fast --no-config -v
5
5
golangci-lint run --no-config -v
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ Flags:
255
255
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
256
256
257
257
# golint: Annoying issue about not having a comment. The rare codebase has such comments
258
- - (comment on exported (method|function)|should have( a package)? comment|comment should be of the form)
258
+ - (comment on exported (method|function|type )|should have( a package)? comment|comment should be of the form)
259
259
260
260
# golint: False positive when tests are defined in package 'test'
261
261
- 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/`
403
403
```
404
404
Vendoring ` golangci-lint ` saves a network request, potentially making your CI system a little more reliable.
405
405
406
+ ** Q: ` govet ` or ` golint ` reports false-positives or false-negatives**
407
+ These linters obtain type information from installed package files.
408
+ The same issue you will encounter if will run ` govet ` or ` golint ` without ` golangci-lint ` .
409
+ Try ` go install -i ./... ` (or ` go install -i ./cmd/... ` : depends on the project) first.
410
+
406
411
** Q: ` golangci-lint ` doesn't work**
407
412
1 . Update it: ` go get -u github.com/golangci/golangci-lint/cmd/golangci-lint `
408
413
2 . Run it with ` -v ` option and check the output.
Original file line number Diff line number Diff line change @@ -275,6 +275,11 @@ go install ./vendor/github.com/golangci/golangci-lint/cmd/golangci-lint/`
275
275
```
276
276
Vendoring `golangci-lint` saves a network request, potentially making your CI system a little more reliable.
277
277
278
+ **Q: `govet` or `golint` reports false-positives or false-negatives**
279
+ These linters obtain type information from installed package files.
280
+ The same issue you will encounter if will run `govet` or `golint` without `golangci-lint`.
281
+ Try `go install -i ./...` (or `go install -i ./cmd/...`: depends on the project) first.
282
+
278
283
**Q: `golangci-lint` doesn't work**
279
284
1. Update it: `go get -u github.com/golangci/golangci-lint/cmd/golangci-lint`
280
285
2. Run it with `-v` option and check the output.
You can’t perform that action at this time.
0 commit comments