Skip to content

Commit c144a3c

Browse files
committed
update information about editor integration and nolint in README.md
1 parent a37c6e6 commit c144a3c

File tree

2 files changed

+32
-16
lines changed

2 files changed

+32
-16
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
GolangCI-Lint is a linters aggregator. It's fast: on average [5 times faster](#performance) than gometalinter. It's [easy to integrate and use](#issues-options), has [nice output](#quick-start) and has a minimum number of false positives.
55

6-
GolangCI-Lint has [integrations](#ide-integrations) with VS Code, GNU Emacs, Sublime Text.
6+
GolangCI-Lint has [integrations](#editor-integration) with VS Code, GNU Emacs, Sublime Text.
77

88
Sponsored by [GolangCI.com](https://golangci.com): SaaS service for running linters on Github pull requests. Free for Open Source.
99

@@ -12,12 +12,12 @@ Sponsored by [GolangCI.com](https://golangci.com): SaaS service for running lint
1212
* [Demo](#demo)
1313
* [Install](#install)
1414
* [Quick Start](#quick-start)
15+
* [Editor Integration](#editor-integration)
1516
* [Comparison](#comparison)
1617
* [Performance](#performance)
1718
* [Supported Linters](#supported-linters)
1819
* [Configuration](#configuration)
1920
* [False Positives](#false-positives)
20-
* [IDE integrations](#ide-integrations)
2121
* [Internals](#internals)
2222
* [FAQ](#faq)
2323
* [Thanks](#thanks)
@@ -120,6 +120,12 @@ Pass `-E/--enable` to enable linter and `-D/--disable` to disable:
120120
$ golangci-lint run --disable-all -E errcheck
121121
```
122122

123+
# Editor Integration
124+
1. [Go for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go).
125+
2. Sublime Text - [plugin](https://github.com/alecthomas/SublimeLinter-contrib-golang-cilint) for SublimeLinter.
126+
3. GNU Emacs - [flycheck checker](https://github.com/weijiangan/flycheck-golangci-lint).
127+
4. Vim - [issue](https://github.com/fatih/vim-go/issues/1841) for vim-go.
128+
123129
# Comparison
124130
## `golangci-lint` vs `gometalinter`
125131
GolangCI-Lint was created to fix next issues with `gometalinter`:
@@ -332,15 +338,17 @@ False positives are inevitable, but we did our best to reduce their count. For e
332338
1. Exclude issue by text using command-line option `-e` or config option `issues.exclude`. It's helpful when you decided to ignore all issues of this type.
333339
2. Exclude this one issue by using special comment `// nolint[:linter1,linter2,...]` on issued line.
334340
Comment `// nolint` disables all issues reporting on this line. Comment e.g. `// nolint:govet` disables only govet issues for this line.
341+
If you would like to completely exclude all issues for some function prepend this comment
342+
above function:
343+
```go
344+
//nolint
345+
func f() {
346+
...
347+
}
348+
```
335349

336350
Please create [GitHub Issues here](https://github.com/golangci/golangci-lint/issues/new) about found false positives. We will add it to default exclude list if it's common or we will fix underlying linter.
337351

338-
# IDE integrations
339-
1. VS Code - [pull request](https://github.com/Microsoft/vscode-go/pull/1693) to vscode-go (thanks to [pdf](https://github.com/pdf)).
340-
2. Vim - [issue](https://github.com/fatih/vim-go/issues/1841) for vim-go.
341-
3. GNU Emacs - [flycheck checker](https://github.com/weijiangan/flycheck-golangci-lint) (thanks to [weijiangan](https://github.com/weijiangan)).
342-
4. Sublime Text - [plugin](https://github.com/alecthomas/SublimeLinter-contrib-golang-cilint) for SublimeLinter (thanks to [alecthomas](https://github.com/alecthomas)).
343-
344352
# Internals
345353
The key difference with gometalinter is that golangci-lint shares work between specific linters (golint, govet, ...).
346354
For small and medium projects 50-80% of work between linters can be reused.

README.md.tmpl

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
GolangCI-Lint is a linters aggregator. It's fast: on average [5 times faster](#performance) than gometalinter. It's [easy to integrate and use](#issues-options), has [nice output](#quick-start) and has a minimum number of false positives.
55

6-
GolangCI-Lint has [integrations](#ide-integrations) with VS Code, GNU Emacs, Sublime Text.
6+
GolangCI-Lint has [integrations](#editor-integration) with VS Code, GNU Emacs, Sublime Text.
77

88
Sponsored by [GolangCI.com](https://golangci.com): SaaS service for running linters on Github pull requests. Free for Open Source.
99

@@ -12,12 +12,12 @@ Sponsored by [GolangCI.com](https://golangci.com): SaaS service for running lint
1212
* [Demo](#demo)
1313
* [Install](#install)
1414
* [Quick Start](#quick-start)
15+
* [Editor Integration](#editor-integration)
1516
* [Comparison](#comparison)
1617
* [Performance](#performance)
1718
* [Supported Linters](#supported-linters)
1819
* [Configuration](#configuration)
1920
* [False Positives](#false-positives)
20-
* [IDE integrations](#ide-integrations)
2121
* [Internals](#internals)
2222
* [FAQ](#faq)
2323
* [Thanks](#thanks)
@@ -98,6 +98,12 @@ Pass `-E/--enable` to enable linter and `-D/--disable` to disable:
9898
$ golangci-lint run --disable-all -E errcheck
9999
```
100100

101+
# Editor Integration
102+
1. [Go for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go).
103+
2. Sublime Text - [plugin](https://github.com/alecthomas/SublimeLinter-contrib-golang-cilint) for SublimeLinter.
104+
3. GNU Emacs - [flycheck checker](https://github.com/weijiangan/flycheck-golangci-lint).
105+
4. Vim - [issue](https://github.com/fatih/vim-go/issues/1841) for vim-go.
106+
101107
# Comparison
102108
## `golangci-lint` vs `gometalinter`
103109
GolangCI-Lint was created to fix next issues with `gometalinter`:
@@ -204,15 +210,17 @@ False positives are inevitable, but we did our best to reduce their count. For e
204210
1. Exclude issue by text using command-line option `-e` or config option `issues.exclude`. It's helpful when you decided to ignore all issues of this type.
205211
2. Exclude this one issue by using special comment `// nolint[:linter1,linter2,...]` on issued line.
206212
Comment `// nolint` disables all issues reporting on this line. Comment e.g. `// nolint:govet` disables only govet issues for this line.
213+
If you would like to completely exclude all issues for some function prepend this comment
214+
above function:
215+
```go
216+
//nolint
217+
func f() {
218+
...
219+
}
220+
```
207221

208222
Please create [GitHub Issues here](https://github.com/golangci/golangci-lint/issues/new) about found false positives. We will add it to default exclude list if it's common or we will fix underlying linter.
209223

210-
# IDE integrations
211-
1. VS Code - [pull request](https://github.com/Microsoft/vscode-go/pull/1693) to vscode-go (thanks to [pdf](https://github.com/pdf)).
212-
2. Vim - [issue](https://github.com/fatih/vim-go/issues/1841) for vim-go.
213-
3. GNU Emacs - [flycheck checker](https://github.com/weijiangan/flycheck-golangci-lint) (thanks to [weijiangan](https://github.com/weijiangan)).
214-
4. Sublime Text - [plugin](https://github.com/alecthomas/SublimeLinter-contrib-golang-cilint) for SublimeLinter (thanks to [alecthomas](https://github.com/alecthomas)).
215-
216224
# Internals
217225
The key difference with gometalinter is that golangci-lint shares work between specific linters (golint, govet, ...).
218226
For small and medium projects 50-80% of work between linters can be reused.

0 commit comments

Comments
 (0)