Skip to content

Commit c8af5b0

Browse files
committed
Update README.
* Add license, release, and docker badges. * Fix install instructions/table of contents. * Fix misc. typos.
1 parent 4461816 commit c8af5b0

File tree

2 files changed

+38
-36
lines changed

2 files changed

+38
-36
lines changed

README.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
[![Build Status](https://travis-ci.com/golangci/golangci-lint.svg?branch=master)](https://travis-ci.com/golangci/golangci-lint)
44
[![GolangCI](https://golangci.com/badges/github.com/golangci/golangci-lint.svg)](https://golangci.com)
5+
[![License](https://img.shields.io/github/license/golangci/golangci-lint)](/LICENSE)
6+
[![Release](https://img.shields.io/github/release/golangci/golangci-lint.svg)](https://github.com/golangci/golangci-lint/releases/latest)
7+
[![Docker](https://img.shields.io/docker/pulls/golangci/golangci-lint)](https://hub.docker.com/r/golangci/golangci-lint)
58

69
GolangCI-Lint is a linters aggregator. It's fast: on average [5 times faster](#performance) than gometalinter.
710
It's [easy to integrate and use](#command-line-options), has [nice output](#quick-start) and has a minimum number of false positives. It supports go modules.
@@ -10,22 +13,22 @@ GolangCI-Lint has [integrations](#editor-integration) with VS Code, GNU Emacs, S
1013

1114
Follow the news and releases on our [twitter](https://twitter.com/golangci) and our [blog](https://medium.com/golangci).
1215

13-
Sponsored by [GolangCI.com](https://golangci.com): SaaS service for running linters on Github pull requests. Free for Open Source.
16+
Sponsored by [GolangCI.com](https://golangci.com): SaaS service for running linters on GitHub pull requests. Free for Open Source.
1417

1518
<a href="https://golangci.com/"><img src="docs/go.png" width="250px"></a>
1619

1720
- [GolangCI-Lint](#golangci-lint)
1821
- [Demo](#demo)
1922
- [Install](#install)
20-
- [Binary Release](#binary-release)
21-
- [MacOS](#macos)
22-
- [By Docker](#by-docker)
23-
- [go get](#go-get)
23+
- [Binary](#binary)
24+
- [macOS](#macos)
25+
- [Docker](#docker)
26+
- [Go](#go)
2427
- [Trusted By](#trusted-by)
2528
- [Quick Start](#quick-start)
2629
- [Editor Integration](#editor-integration)
2730
- [Shell Completion](#shell-completion)
28-
- [Mac OS X](#mac-os-x)
31+
- [macOS](#macos-1)
2932
- [Linux](#linux)
3033
- [Comparison](#comparison)
3134
- [`golangci-lint` vs `gometalinter`](#golangci-lint-vs-gometalinter)
@@ -62,15 +65,13 @@ Short 1.5 min video demo of analyzing [beego](https://github.com/astaxie/beego).
6265

6366
## Install
6467

65-
### Binary Release
68+
### Binary
6669

67-
Most installations are done for CI (travis, circleci etc). It's important to have reproducible CI:
70+
Most installations are done for CI (e.g. Travis CI, CircleCI). It's important to have reproducible CI:
6871
don't start to fail all builds at the same time. With golangci-lint this can happen if you
6972
use deprecated option `--enable-all` and a new linter is added or even without `--enable-all`: when one upstream linter is upgraded.
7073

71-
It's highly recommended to install a specific version of golangci-lint. Releases are available on the [releases page](https://github.com/golangci/golangci-lint/releases).
72-
73-
Latest release: [![GitHub release](https://img.shields.io/github/release/golangci/golangci-lint.svg)]((https://github.com/golangci/golangci-lint/releases/latest))
74+
It's highly recommended to install a specific version of golangci-lint available on the [releases page](https://github.com/golangci/golangci-lint/releases).
7475

7576
Here is the recommended way to install golangci-lint v1.21.0:
7677

@@ -90,28 +91,28 @@ golangci-lint --version
9091
It is advised that you periodically update version of golangci-lint as the project is under active development
9192
and is constantly being improved. For any problems with golangci-lint, check out recent [GitHub issues](https://github.com/golangci/golangci-lint/issues) and update if needed.
9293

93-
### MacOS
94+
### macOS
9495

95-
You can also install a binary release on MacOS using [brew](https://brew.sh/):
96+
You can also install a binary release on macOS using [brew](https://brew.sh/):
9697

9798
```bash
9899
brew install golangci/tap/golangci-lint
99100
brew upgrade golangci/tap/golangci-lint
100101
```
101102

102-
### By Docker
103+
### Docker
103104

104105
```bash
105106
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.21.0 golangci-lint run -v
106107
```
107108

108-
### go get
109+
### Go
109110

110111
Please, do not install `golangci-lint` by `go get`:
111112

112113
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`.
113114
2. it's much slower than binary installation
114-
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)).
115+
3. its stability depends on your Go version (e.g. on [this compiler Go <= 1.12 bug](https://github.com/golang/go/issues/29612)).
115116
4. it's not guaranteed to work: e.g. we've encountered a lot of issues with Go modules hashes.
116117
5. it allows installation from `master` branch which can't be considered stable.
117118

@@ -271,7 +272,7 @@ golangci-lint run --disable-all -E errcheck
271272
272273
`golangci-lint` can generate bash completion file.
273274
274-
### Mac OS X
275+
### macOS
275276
276277
There are two versions of `bash-completion`, v1 and v2. V1 is for Bash 3.2 (which is the default on macOS), and v2 is for Bash 4.1+. The `golangci-lint` completion script doesn’t work correctly with bash-completion v1 and Bash 3.2. It requires bash-completion v2 and Bash 4.1+. Thus, to be able to correctly use `golangci-lint` completion on macOS, you have to install and use Bash 4.1+ ([instructions](https://itnext.io/upgrading-bash-on-macos-7138bd1066ba)). The following instructions assume that you use Bash 4.1+ (that is, any Bash version of 4.1 or newer).
277278
@@ -1115,7 +1116,7 @@ We don't recommend vendoring `golangci-lint` in your repo: you will get troubles
11151116
No, you don't need to do it anymore.
11161117
11171118
**Which go versions are supported**
1118-
Short answer: go 1.12 and newer are oficially supported.
1119+
Short answer: go 1.12 and newer are officially supported.
11191120
11201121
Long answer:
11211122

README.tmpl.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
[![Build Status](https://travis-ci.com/golangci/golangci-lint.svg?branch=master)](https://travis-ci.com/golangci/golangci-lint)
44
[![GolangCI](https://golangci.com/badges/github.com/golangci/golangci-lint.svg)](https://golangci.com)
5+
[![License](https://img.shields.io/github/license/golangci/golangci-lint)](/LICENSE)
6+
[![Release](https://img.shields.io/github/release/golangci/golangci-lint.svg)](https://github.com/golangci/golangci-lint/releases/latest)
7+
[![Docker](https://img.shields.io/docker/pulls/golangci/golangci-lint)](https://hub.docker.com/r/golangci/golangci-lint)
58

69
GolangCI-Lint is a linters aggregator. It's fast: on average [5 times faster](#performance) than gometalinter.
710
It's [easy to integrate and use](#command-line-options), has [nice output](#quick-start) and has a minimum number of false positives. It supports go modules.
@@ -10,22 +13,22 @@ GolangCI-Lint has [integrations](#editor-integration) with VS Code, GNU Emacs, S
1013

1114
Follow the news and releases on our [twitter](https://twitter.com/golangci) and our [blog](https://medium.com/golangci).
1215

13-
Sponsored by [GolangCI.com](https://golangci.com): SaaS service for running linters on Github pull requests. Free for Open Source.
16+
Sponsored by [GolangCI.com](https://golangci.com): SaaS service for running linters on GitHub pull requests. Free for Open Source.
1417

1518
<a href="https://golangci.com/"><img src="docs/go.png" width="250px"></a>
1619

1720
- [GolangCI-Lint](#golangci-lint)
1821
- [Demo](#demo)
1922
- [Install](#install)
20-
- [Binary Release](#binary-release)
21-
- [MacOS](#macos)
22-
- [By Docker](#by-docker)
23-
- [go get](#go-get)
23+
- [Binary](#binary)
24+
- [macOS](#macos)
25+
- [Docker](#docker)
26+
- [Go](#go)
2427
- [Trusted By](#trusted-by)
2528
- [Quick Start](#quick-start)
2629
- [Editor Integration](#editor-integration)
2730
- [Shell Completion](#shell-completion)
28-
- [Mac OS X](#mac-os-x)
31+
- [macOS](#macos-1)
2932
- [Linux](#linux)
3033
- [Comparison](#comparison)
3134
- [`golangci-lint` vs `gometalinter`](#golangci-lint-vs-gometalinter)
@@ -62,15 +65,13 @@ Short 1.5 min video demo of analyzing [beego](https://github.com/astaxie/beego).
6265

6366
## Install
6467

65-
### Binary Release
68+
### Binary
6669

67-
Most installations are done for CI (travis, circleci etc). It's important to have reproducible CI:
70+
Most installations are done for CI (e.g. Travis CI, CircleCI). It's important to have reproducible CI:
6871
don't start to fail all builds at the same time. With golangci-lint this can happen if you
6972
use deprecated option `--enable-all` and a new linter is added or even without `--enable-all`: when one upstream linter is upgraded.
7073

71-
It's highly recommended to install a specific version of golangci-lint. Releases are available on the [releases page](https://github.com/golangci/golangci-lint/releases).
72-
73-
Latest release: [![GitHub release](https://img.shields.io/github/release/golangci/golangci-lint.svg)]((https://github.com/golangci/golangci-lint/releases/latest))
74+
It's highly recommended to install a specific version of golangci-lint available on the [releases page](https://github.com/golangci/golangci-lint/releases).
7475

7576
Here is the recommended way to install golangci-lint {{.LatestVersion}}:
7677

@@ -90,28 +91,28 @@ golangci-lint --version
9091
It is advised that you periodically update version of golangci-lint as the project is under active development
9192
and is constantly being improved. For any problems with golangci-lint, check out recent [GitHub issues](https://github.com/golangci/golangci-lint/issues) and update if needed.
9293

93-
### MacOS
94+
### macOS
9495

95-
You can also install a binary release on MacOS using [brew](https://brew.sh/):
96+
You can also install a binary release on macOS using [brew](https://brew.sh/):
9697

9798
```bash
9899
brew install golangci/tap/golangci-lint
99100
brew upgrade golangci/tap/golangci-lint
100101
```
101102

102-
### By Docker
103+
### Docker
103104

104105
```bash
105106
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:{{.LatestVersion}} golangci-lint run -v
106107
```
107108

108-
### go get
109+
### Go
109110

110111
Please, do not install `golangci-lint` by `go get`:
111112

112113
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`.
113114
2. it's much slower than binary installation
114-
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)).
115+
3. its stability depends on your Go version (e.g. on [this compiler Go <= 1.12 bug](https://github.com/golang/go/issues/29612)).
115116
4. it's not guaranteed to work: e.g. we've encountered a lot of issues with Go modules hashes.
116117
5. it allows installation from `master` branch which can't be considered stable.
117118

@@ -232,7 +233,7 @@ golangci-lint run --disable-all -E errcheck
232233

233234
`golangci-lint` can generate bash completion file.
234235

235-
### Mac OS X
236+
### macOS
236237

237238
There are two versions of `bash-completion`, v1 and v2. V1 is for Bash 3.2 (which is the default on macOS), and v2 is for Bash 4.1+. The `golangci-lint` completion script doesn’t work correctly with bash-completion v1 and Bash 3.2. It requires bash-completion v2 and Bash 4.1+. Thus, to be able to correctly use `golangci-lint` completion on macOS, you have to install and use Bash 4.1+ ([instructions](https://itnext.io/upgrading-bash-on-macos-7138bd1066ba)). The following instructions assume that you use Bash 4.1+ (that is, any Bash version of 4.1 or newer).
238239

@@ -537,7 +538,7 @@ We don't recommend vendoring `golangci-lint` in your repo: you will get troubles
537538
No, you don't need to do it anymore.
538539

539540
**Which go versions are supported**
540-
Short answer: go 1.12 and newer are oficially supported.
541+
Short answer: go 1.12 and newer are officially supported.
541542

542543
Long answer:
543544

0 commit comments

Comments
 (0)