@@ -3,17 +3,22 @@ title: Command-Line
3
3
weight : 1
4
4
---
5
5
6
- ## run
6
+ ``` console
7
+ $ golangci-lint -h
8
+ {.CmdRootHelpText}
9
+ ```
10
+
11
+ ## ` run `
7
12
8
13
{{< cards >}}
9
14
{{< card link="/docs/linters" title="Linters Overview" icon="collection" >}}
10
15
{{< card link="/docs/configuration/file/#linters-configuration" title="Global Configuration" icon="adjustments" >}}
11
16
{{< card link="/docs/linters/configuration/" title="Linter Settings" icon="adjustments" >}}
12
17
{{< /cards >}}
13
18
14
- ``` sh
19
+ ``` console
15
20
$ golangci-lint run -h
16
- {.RunHelpText }
21
+ {.CmdRunHelpText }
17
22
```
18
23
19
24
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
22
27
When the ` --trace-path ` argument is specified, ` golangci-lint ` writes runtime tracing data in the format expected by
23
28
the ` go tool trace ` command and visualization tool.
24
29
25
- ### Cache
30
+ ## ` linters `
31
+
32
+ ``` console
33
+ $ golangci-lint linters -h
34
+ {.CmdLintersHelpText}
35
+ ```
36
+
37
+ ## ` cache `
26
38
27
39
Golangci-lint stores its cache in the subdirectory ` golangci-lint ` inside the [ default user cache directory] ( https://pkg.go.dev/os#UserCacheDir ) .
28
40
29
41
You can override the default cache directory with the environment variable ` GOLANGCI_LINT_CACHE ` ; the path must be absolute.
30
42
43
+ The cache is only used by ` golangci-lint run ` (linters).
44
+
45
+ ``` console
46
+ $ golangci-lint cache -h
47
+ {.CmdCacheHelpText}
48
+ ```
49
+
31
50
## fmt
32
51
33
52
{{< cards >}}
@@ -36,7 +55,49 @@ You can override the default cache directory with the environment variable `GOLA
36
55
{{< card link="/docs/formatters/configuration/" title="Formatter Settings" icon="adjustments" >}}
37
56
{{< /cards >}}
38
57
39
- ``` sh
58
+ ``` console
40
59
$ 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}
42
103
```
0 commit comments