Skip to content

Commit

Permalink
doc: swith CLI and config file
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jan 19, 2022
1 parent 2eb3f15 commit 5942614
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions docs/src/docs/usage/configuration.mdx
Expand Up @@ -12,19 +12,6 @@ To see a list of enabled by your configuration linters:
golangci-lint linters
```

## Command-Line Options

```sh
golangci-lint run -h
{.RunHelpText}
```

When the `--cpu-profile-path` or `--mem-profile-path` arguments are specified, `golangci-lint` writes runtime profiling data
in the format expected by the [pprof](https://github.com/google/pprof) visualization tool.

When the `--trace-path` argument is specified, `golangci-lint` writes runtime tracing data in the format expected by
the `go tool trace` command and visualization tool.

## Config File

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

There is a [`.golangci.example.yml`](https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml) example
config file with all supported options, their description and default value:
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.
This file is a neither a working example nor recommended configuration, it's just a reference to display all the configuration options.

{ .ConfigurationExample }

## Command-Line Options

```sh
golangci-lint run -h
{.RunHelpText}
```

When the `--cpu-profile-path` or `--mem-profile-path` arguments are specified, `golangci-lint` writes runtime profiling data
in the format expected by the [pprof](https://github.com/google/pprof) visualization tool.

When the `--trace-path` argument is specified, `golangci-lint` writes runtime tracing data in the format expected by
the `go tool trace` command and visualization tool.

## Cache

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

0 comments on commit 5942614

Please sign in to comment.