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
* [golangci-lint vs gometalinter](#golangci-lint-vs-gometalinter)
14
-
* [golangci-lint vs Run Needed Linters Manually](#golangci-lint-vs-run-needed-linters-manually)
15
-
*[Performance](#performance)
16
-
* [Default Mode](#default-mode)
17
-
* [Fast Mode](#fast-mode)
18
-
*[Supported Linters](#supported-linters)
19
-
* [Enabled By Default Linters](#enabled-by-default-linters)
20
-
* [Disabled By Default Linters (-E/--enable)](#disabled-by-default-linters--e--enable)
21
-
*[Configuration](#configuration)
22
-
* [Command-Line Options](#command-line-options)
23
-
* [Run Options](#run-options)
24
-
* [Linters](#linters)
25
-
* [Linters Options](#linters-options)
26
-
* [Issues Options](#issues-options)
27
-
* [Output Options](#output-options)
28
-
* [Configuration File](#configuration-file)
29
-
*[False Positives](#false-positives)
30
-
*[FAQ](#faq)
31
-
*[Internals](#internals)
10
+
*[Install](#install)
11
+
*[Demo](#demo)
12
+
*[Quick Start](#quick-start)
13
+
*[Comparison](#comparison)
14
+
*[<code>golangci-lint</code> vs <code>gometalinter</code>](#golangci-lint-vs-gometalinter)
15
+
*[<code>golangci-lint</code> vs Run Needed Linters Manually](#golangci-lint-vs-run-needed-linters-manually)
16
+
*[Performance](#performance)
17
+
*[Comparison with gometalinter](#comparison-with-gometalinter)
18
+
*[Supported Linters](#supported-linters)
19
+
*[Enabled By Default Linters](#enabled-by-default-linters)
20
+
*[Disabled By Default Linters (-E/--enable)](#disabled-by-default-linters--e--enable)
21
+
*[Configuration](#configuration)
22
+
*[Command-Line Options](#command-line-options)
23
+
*[Configuration File](#configuration-file)
24
+
*[False Positives](#false-positives)
25
+
*[Internals](#internals)
26
+
*[FAQ](#faq)
27
+
*[Thanks](#thanks)
28
+
*[Future Plans](#future-plans)
32
29
33
30
# Install
34
31
```bash
@@ -326,6 +323,24 @@ Comment `// nolint` disables all issues reporting on this line. Comment e.g. `//
326
323
327
324
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 even fix underlying linter.
328
325
326
+
# Internals
327
+
Key difference with gometalinter is that golangci-lint shares work between specific linters (golint, govet, ...).
328
+
For small and medium projects 50-80% of work between linters can be reused.
329
+
Now we share `loader.Program` and `SSA` representation building. `SSA` representation is used from
330
+
a [fork of go-tools](https://github.com/dominikh/go-tools), not the official one. Also we are going to
331
+
reuse `AST` parsing and traversal.
332
+
333
+
We don't fork to call specific linter but use it's API. We forked github repos of almost all linters
334
+
to make API. It also allows us to be more performant and control actual count of used threads.
335
+
336
+
All linters are vendored in `/vendor` folder: their version is fixed, they are builtin
337
+
and you don't need to install them separately.
338
+
339
+
We use chains for issues and independent processors to post-process them: exclude issues by limits,
340
+
nolint comment, diff, regexps; prettify paths etc.
341
+
342
+
We use `cobra` for command-line action.
343
+
329
344
# FAQ
330
345
**Q: How to add custom linter?**
331
346
@@ -347,24 +362,6 @@ A: You have 2 choices:
347
362
2. Run it with `-v` option and check output.
348
363
3. If it doesn't help create [GitHub issue](https://github.com/golangci/golangci-lint/issues/new).
349
364
350
-
# Internals
351
-
Key difference with gometalinter is that golangci-lint shares work between specific linters (golint, govet, ...).
352
-
For small and medium projects 50-80% of work between linters can be reused.
353
-
Now we share `loader.Program` and `SSA` representation building. `SSA` representation is used from
354
-
a [fork of go-tools](https://github.com/dominikh/go-tools), not the official one. Also we are going to
355
-
reuse `AST` parsing and traversal.
356
-
357
-
We don't fork to call specific linter but use it's API. We forked github repos of almost all linters
358
-
to make API. It also allows us to be more performant and control actual count of used threads.
359
-
360
-
All linters are vendored in `/vendor` folder: their version is fixed, they are builtin
361
-
and you don't need to install them separately.
362
-
363
-
We use chains for issues and independent processors to post-process them: exclude issues by limits,
364
-
nolint comment, diff, regexps; prettify paths etc.
365
-
366
-
We use `cobra` for command-line action.
367
-
368
365
# Thanks
369
366
Thanks to [alecthomas/gometalinter](https://github.com/alecthomas/gometalinter) for inspiration and amazing work.
0 commit comments