Skip to content

Commit af9677c

Browse files
committed
docs: add more commands help
1 parent 2a0dd9c commit af9677c

File tree

5 files changed

+137
-21
lines changed

5 files changed

+137
-21
lines changed

assets/cli-help.json

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/docs/configuration/cli.md

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ title: Command-Line
33
weight: 1
44
---
55

6-
## run
6+
```sh
7+
$ golangci-lint -h
8+
{.CmdRootHelpText}
9+
```
10+
11+
## `run`
712

813
{{< cards >}}
914
{{< card link="/docs/linters" title="Linters Overview" icon="collection" >}}
@@ -13,7 +18,7 @@ weight: 1
1318

1419
```sh
1520
$ golangci-lint run -h
16-
{.RunHelpText}
21+
{.CmdRunHelpText}
1722
```
1823

1924
When the `--cpu-profile-path` or `--mem-profile-path` arguments are specified,
@@ -22,12 +27,26 @@ golangci-lint writes runtime profiling data in the format expected by the [pprof
2227
When the `--trace-path` argument is specified, `golangci-lint` writes runtime tracing data in the format expected by
2328
the `go tool trace` command and visualization tool.
2429

25-
### Cache
30+
### `cache`
2631

2732
Golangci-lint stores its cache in the subdirectory `golangci-lint` inside the [default user cache directory](https://pkg.go.dev/os#UserCacheDir).
2833

2934
You can override the default cache directory with the environment variable `GOLANGCI_LINT_CACHE`; the path must be absolute.
3035

36+
The cache is only used by `golangci-lint run` (linters).
37+
38+
```sh
39+
$ golangci-lint cache -h
40+
{.CmdCacheHelpText}
41+
```
42+
43+
### `linters`
44+
45+
```sh
46+
$ golangci-lint linters -h
47+
{.CmdLintersHelpText}
48+
```
49+
3150
## fmt
3251

3352
{{< cards >}}
@@ -38,5 +57,40 @@ You can override the default cache directory with the environment variable `GOLA
3857

3958
```sh
4059
$ golangci-lint fmt -h
41-
{.FmtHelpText}
60+
{.CmdFmtHelpText}
61+
```
62+
63+
### `formatters`
64+
65+
```sh
66+
$ golangci-lint formatters -h
67+
{.CmdFormattersHelpText}
68+
```
69+
70+
## `help`
71+
72+
```sh
73+
$ golangci-lint help -h
74+
{.CmdHelpText}
75+
```
76+
77+
## `migrate`
78+
79+
```sh
80+
$ golangci-lint migrate -h
81+
{.CmdMigrateHelpText}
82+
```
83+
84+
## `custom`
85+
86+
```sh
87+
$ golangci-lint custom -h
88+
{.CmdCustomHelpText}
89+
```
90+
91+
## `version`
92+
93+
```sh
94+
$ golangci-lint version -h
95+
{.CmdVersionHelpText}
4296
```

0 commit comments

Comments
 (0)