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
* [Enabled By Default Linters](#enabled-by-default-linters)
21
+
* [Disabled By Default Linters (-E/--enable)](#disabled-by-default-linters--e--enable)
22
+
*[Configuration](#configuration)
23
+
* [Command-Line Options](#command-line-options)
24
+
* [Run Options](#run-options)
25
+
* [Linters](#linters)
26
+
* [Linters Options](#linters-options)
27
+
* [Issues Options](#issues-options)
28
+
* [Output Options](#output-options)
29
+
* [Configuration File](#configuration-file)
30
+
*[False Positives](#false-positives)
31
+
*[FAQ](#faq)
32
+
*[Internals](#internals)
11
33
12
34
# Install
13
35
```bash
@@ -73,7 +95,7 @@ $ golangci-lint run --disable-all -E errcheck
73
95
# Comparison
74
96
## `gometalinter`
75
97
GolangCI-Lint was created to fix next issues with `gometalinter`:
76
-
1. Slow work: `gometalinter` usually works for minutes in average projects. GolangCI-Lint works [2-10x times faster](#benchmarks) by [reusing work](#internals).
98
+
1. Slow work: `gometalinter` usually works for minutes in average projects. GolangCI-Lint works [2-6x times faster](#benchmarks) by [reusing work](#internals).
77
99
2. Huge memory consumption: parallel linters don't share the same program representation and can eat `n` times more memory (`n` - concurrency). GolangCI-Lint fixes it by sharing representation.
78
100
3. Can't set honest concurrency: if you set it to `n` it can take `n+x` threads because of forced threads in specific linters. `gometalinter` can't do anything about it, because it runs linters as black-boxes in forked processes. In GolangCI-Lint we run all linters in one process and fully control them. Configured concurrency will be honest.
79
101
This issue is important because often you'd like to set concurrency to CPUs count minus one to save one CPU for example for IDE. It concurrency isn't correct you will have troubles using IDE while analyzing code.
@@ -89,14 +111,53 @@ This issue is important because often you'd like to set concurrency to CPUs coun
89
111
3. It will take more time because of different usages and need of tracking of version of `n` linters.
90
112
91
113
# Performance
92
-
## Benchmarks
114
+
## Default Mode
115
+
We compare golangci-lint and gometalinter in default mode, but explicitly specify all linters to enable because of small differences in default configuration.
116
+
```bash
117
+
$ golangci-lint run --no-config --issues-exit-code=0 --deadline=30m \
0 commit comments