Skip to content

Commit a4e952f

Browse files
author
golangci
authored
Update ToC in README
1 parent 1f6f3a2 commit a4e952f

File tree

1 file changed

+37
-40
lines changed

1 file changed

+37
-40
lines changed

README.md

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,25 @@ Sponsored by [GolangCI.com](https://golangci.com): SaaS service for running lint
77

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

10-
* [Install](#install)
11-
* [Quick Start](#quick-start)
12-
* [Comparison](#comparison)
13-
* [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)
3229

3330
# Install
3431
```bash
@@ -326,6 +323,24 @@ Comment `// nolint` disables all issues reporting on this line. Comment e.g. `//
326323

327324
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.
328325

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+
329344
# FAQ
330345
**Q: How to add custom linter?**
331346

@@ -347,24 +362,6 @@ A: You have 2 choices:
347362
2. Run it with `-v` option and check output.
348363
3. If it doesn't help create [GitHub issue](https://github.com/golangci/golangci-lint/issues/new).
349364

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-
368365
# Thanks
369366
Thanks to [alecthomas/gometalinter](https://github.com/alecthomas/gometalinter) for inspiration and amazing work.
370367
Thanks to developers and authors of used linters:

0 commit comments

Comments
 (0)