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
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.20.0 golangci-lint run -v
109
108
```
110
109
111
-
On Windows, you can run the above commands with Git Bash, which comes with [Git for Windows](https://git-scm.com/download/win).
110
+
### go get
111
+
112
+
Please, do not install `golangci-lint` by `go get`:
113
+
114
+
1.[`go.mod`](https://github.com/golangci/golangci-lint/blob/master/go.mod) replacement directive doesn't apply. It means you will be using patched version of `golangci-lint`.
115
+
2. it's much slower than binary installation
116
+
3. it's stability depends on your Go version (e.g. on [this compiler Go <= 1.12 bug](https://github.com/golang/go/issues/29612)).
117
+
4. it's not guaranteed to work: e.g. we've encountered a lot of issues with Go modules hashes.
118
+
5. it allows installation from `master` branch which can't be considered stable.
112
119
113
120
## Trusted By
114
121
@@ -515,7 +522,6 @@ Flags:
515
522
--skip-files strings Regexps of files to skip
516
523
-E, --enable strings Enable specific linter
517
524
-D, --disable strings Disable specific linter
518
-
--enable-all Enable all linters
519
525
--disable-all Disable all linters
520
526
-p, --presets strings Enable presets (bugs|complexity|format|performance|style|unused) of linters. Run 'golangci-lint linters' to see them. This option implies option --disable-all
521
527
--fast Run only fast linters from enabled linters set (first run won't be fast)
@@ -818,7 +824,6 @@ linters:
818
824
enable:
819
825
- megacheck
820
826
- govet
821
-
enable-all: false
822
827
disable:
823
828
- maligned
824
829
- prealloc
@@ -945,6 +950,7 @@ linters-settings:
945
950
statements: 50
946
951
947
952
linters:
953
+
# please, do not use `enable-all`: it's deprecated and will be removed soon.
948
954
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
949
955
disable-all: true
950
956
enable:
@@ -1097,7 +1103,7 @@ Long answer:
1097
1103
1098
1104
**`golangci-lint` doesn't work**
1099
1105
1100
-
1. Update it: `go get -u github.com/golangci/golangci-lint/cmd/golangci-lint`
1106
+
1. Please, ensure you are using the latest binary release.
1101
1107
2. Run it with `-v` option and check the output.
1102
1108
3. If it doesn't help create a [GitHub issue](https://github.com/golangci/golangci-lint/issues/new) with the output from the error and #2 above.
0 commit comments