Skip to content

Commit 8a74ffa

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

File tree

5 files changed

+160
-25
lines changed

5 files changed

+160
-25
lines changed

assets/cli-help.json

Lines changed: 11 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: 67 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,22 @@ title: Command-Line
33
weight: 1
44
---
55

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

813
{{< cards >}}
914
{{< card link="/docs/linters" title="Linters Overview" icon="collection" >}}
1015
{{< card link="/docs/configuration/file/#linters-configuration" title="Global Configuration" icon="adjustments" >}}
1116
{{< card link="/docs/linters/configuration/" title="Linter Settings" icon="adjustments" >}}
1217
{{< /cards >}}
1318

14-
```sh
19+
```console
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+
## `linters`
31+
32+
```console
33+
$ golangci-lint linters -h
34+
{.CmdLintersHelpText}
35+
```
36+
37+
## `cache`
2638

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

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

43+
The cache is only used by `golangci-lint run` (linters).
44+
45+
```console
46+
$ golangci-lint cache -h
47+
{.CmdCacheHelpText}
48+
```
49+
3150
## fmt
3251

3352
{{< cards >}}
@@ -36,7 +55,49 @@ You can override the default cache directory with the environment variable `GOLA
3655
{{< card link="/docs/formatters/configuration/" title="Formatter Settings" icon="adjustments" >}}
3756
{{< /cards >}}
3857

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

0 commit comments

Comments
 (0)