Skip to content

Commit defde13

Browse files
authored
doc: improve installation section (#3610)
1 parent fe53ca0 commit defde13

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

docs/src/docs/usage/install/index.mdx

+27-24
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,16 @@ and is constantly being improved. For any problems with `golangci-lint`, check o
4444

4545
## Local Installation
4646

47-
### macOS
48-
49-
You can install a binary release on macOS using [brew](https://brew.sh/):
47+
### Binaries
5048

5149
```sh
52-
brew install golangci-lint
53-
brew upgrade golangci-lint
54-
```
55-
56-
Note: Previously we used a [homebrew tap](https://github.com/golangci/homebrew-tap). We recommend using official formula instead of the tap, but sometimes the most recent release
57-
isn't immediately available via homebrew core due to manual updates that need to occur from homebrew core maintainers. In this case, the tap formula, which is updated automatically,
58-
can be used to install the latest version of `golangci-lint`:
50+
# binary will be $(go env GOPATH)/bin/golangci-lint
51+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin {.LatestVersion}
5952

60-
```sh
61-
brew tap golangci/tap
62-
brew install golangci/tap/golangci-lint
53+
golangci-lint --version
6354
```
6455

65-
It can also be installed through [macports](https://www.macports.org/)
66-
The macports installation mode is community driven, and not officially maintained by golangci team.
67-
68-
```sh
69-
sudo port install golangci-lint
70-
```
56+
On Windows, you can run the above commands with Git Bash, which comes with [Git for Windows](https://git-scm.com/download/win).
7157

7258
### Docker
7359

@@ -85,16 +71,33 @@ Colored output:
8571
docker run -t --rm -v $(pwd):/app -w /app golangci/golangci-lint:{.LatestVersion} golangci-lint run -v
8672
```
8773

88-
### Linux and Windows
74+
### macOS
75+
76+
Note: brew can use a non-expected version of Go to build the binary,
77+
so we recommend either using our binaries or be sure of the version of Go used to build.
78+
79+
You can install a binary release on macOS using [brew](https://brew.sh/):
8980

9081
```sh
91-
# binary will be $(go env GOPATH)/bin/golangci-lint
92-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin {.LatestVersion}
82+
brew install golangci-lint
83+
brew upgrade golangci-lint
84+
```
9385

94-
golangci-lint --version
86+
Note: Previously we used a [homebrew tap](https://github.com/golangci/homebrew-tap). We recommend using official formula instead of the tap, but sometimes the most recent release
87+
isn't immediately available via homebrew core due to manual updates that need to occur from homebrew core maintainers. In this case, the tap formula, which is updated automatically,
88+
can be used to install the latest version of `golangci-lint`:
89+
90+
```sh
91+
brew tap golangci/tap
92+
brew install golangci/tap/golangci-lint
9593
```
9694

97-
On Windows, you can run the above commands with Git Bash, which comes with [Git for Windows](https://git-scm.com/download/win).
95+
It can also be installed through [macports](https://www.macports.org/)
96+
The macports installation mode is community driven, and not officially maintained by golangci team.
97+
98+
```sh
99+
sudo port install golangci-lint
100+
```
98101

99102
### Install from Source
100103

0 commit comments

Comments
 (0)