Skip to content

Commit 5942614

Browse files
committed
doc: swith CLI and config file
1 parent 2eb3f15 commit 5942614

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

docs/src/docs/usage/configuration.mdx

+15-15
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,6 @@ To see a list of enabled by your configuration linters:
1212
golangci-lint linters
1313
```
1414

15-
## Command-Line Options
16-
17-
```sh
18-
golangci-lint run -h
19-
{.RunHelpText}
20-
```
21-
22-
When the `--cpu-profile-path` or `--mem-profile-path` arguments are specified, `golangci-lint` writes runtime profiling data
23-
in the format expected by the [pprof](https://github.com/google/pprof) visualization tool.
24-
25-
When the `--trace-path` argument is specified, `golangci-lint` writes runtime tracing data in the format expected by
26-
the `go tool trace` command and visualization tool.
27-
2815
## Config File
2916

3017
GolangCI-Lint looks for config files in the following paths from the current working directory:
@@ -41,11 +28,24 @@ To see which config file is being used and where it was sourced from run golangc
4128
Config options inside the file are identical to command-line options.
4229
You can configure specific linters' options only within the config file (not the command-line).
4330

44-
There is a [`.golangci.example.yml`](https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml) example
45-
config file with all supported options, their description and default value:
31+
There is a [`.golangci.example.yml`](https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml) file with all supported options, their description, and default values.
32+
This file is a neither a working example nor recommended configuration, it's just a reference to display all the configuration options.
4633

4734
{ .ConfigurationExample }
4835

36+
## Command-Line Options
37+
38+
```sh
39+
golangci-lint run -h
40+
{.RunHelpText}
41+
```
42+
43+
When the `--cpu-profile-path` or `--mem-profile-path` arguments are specified, `golangci-lint` writes runtime profiling data
44+
in the format expected by the [pprof](https://github.com/google/pprof) visualization tool.
45+
46+
When the `--trace-path` argument is specified, `golangci-lint` writes runtime tracing data in the format expected by
47+
the `go tool trace` command and visualization tool.
48+
4949
## Cache
5050

5151
GolangCI-Lint stores its cache in the [default user cache directory](https://golang.org/pkg/os/#UserCacheDir).

0 commit comments

Comments
 (0)