@@ -13,16 +13,9 @@ Sponsored by [GolangCI.com](https://golangci.com): SaaS service for running lint
13
13
* [ Install] ( #install )
14
14
* [ Quick Start] ( #quick-start )
15
15
* [ Comparison] ( #comparison )
16
- * [ <code >golangci-lint</code > vs <code >gometalinter</code >] ( #golangci-lint-vs-gometalinter )
17
- * [ <code >golangci-lint</code > vs Run Needed Linters Manually] ( #golangci-lint-vs-run-needed-linters-manually )
18
16
* [ Performance] ( #performance )
19
- * [ Comparison with gometalinter] ( #comparison-with-gometalinter )
20
17
* [ Supported Linters] ( #supported-linters )
21
- * [ Enabled By Default Linters] ( #enabled-by-default-linters )
22
- * [ Disabled By Default Linters (-E/--enable)] ( #disabled-by-default-linters--e--enable )
23
18
* [ Configuration] ( #configuration )
24
- * [ Command-Line Options] ( #command-line-options )
25
- * [ Configuration File] ( #configuration-file )
26
19
* [ False Positives] ( #false-positives )
27
20
* [ IDE integrations] ( #ide-integrations )
28
21
* [ Internals] ( #internals )
@@ -40,24 +33,36 @@ Short 1.5 min video demo of analyzing [beego](https://github.com/astaxie/beego).
40
33
[ ![ asciicast] ( https://asciinema.org/a/183662.png )] ( https://asciinema.org/a/183662 )
41
34
42
35
# Install
43
- Recommended way to install is:
36
+ ## CI Installation
37
+ The most installations are done for CI (travis, circleci etc). It's important to have reproducable CI:
38
+ don't start to fail all builds at one moment. With golangci-lint this can cappen if you
39
+ use ` --enable-all ` and new linter is added or even without ` --enable-all ` : when one linter
40
+ was upgraded from the upstream.
41
+
42
+ Therefore it's highly recommended to install a fixed version of golangci-lint.
43
+ Find needed version on the [ releases page] ( https://github.com/golangci/golangci-lint/releases ) .
44
+
45
+ The recommended way to install golangci-lint is the next:
44
46
``` bash
45
- go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
47
+ curl -sfL https://install.goreleaser.com/ github.com/golangci/golangci-lint.sh | bash -s VERSION
46
48
```
47
49
48
- You can also install it by brew:
50
+ Periodically update version of golangci-lint: we do active development
51
+ and deliver a lot of improvements. But do it explicitly with checking of
52
+ newly found issues.
53
+
54
+ ## Local Installation
55
+ It's a not recommended for CI method. Do it only for the local development.
49
56
``` bash
50
- brew install golangci/tap /golangci-lint
57
+ go get -u github.com/ golangci/golangci-lint/cmd /golangci-lint
51
58
```
52
59
53
- For CI you can use fast local installation :
60
+ You can also install it by brew :
54
61
``` bash
55
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh
62
+ brew install golangci/tap/golangci-lint
63
+ brew upgrade golangci/tap/golangci-lint
56
64
```
57
65
58
- Check the [ releases page] ( https://github.com/golangci/golangci-lint/releases ) to fix the version.
59
-
60
-
61
66
# Quick Start
62
67
To run golangci-lint execute:
63
68
``` bash
0 commit comments