Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion docs/src/docs/product/migration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2070,6 +2070,8 @@ The following flags have been removed:
- `--sort-order`
- `--sort-results`
- `--out-format`
- `--print-issued-lines`
- `--print-linter-name`

#### `--out-format`

Expand Down Expand Up @@ -2126,13 +2128,23 @@ The following flags have been removed:
--output.sarif.path
```

#### `--print-issued-lines`

`--print-issued-lines` has been replaced with `--output.text.print-issued-lines`.

#### `--print-linter-name`

`--print-linter-name` has been replaced with `--output.text.print-linter-name` or `--output.tab.print-linter-name`.

#### `--disable-all` and `--enable-all`

`--disable-all` has been replaced with `--default=none`.

`--enable-all` has been replaced with `--default=all`.

#### Example
#### Examples

Run only the `govet` linter, output results to stdout in JSON format, and sort results:

<details>
<summary style={{color: '#737380', paddingLeft: '1rem'}}>v1</summary>
Expand All @@ -2151,3 +2163,23 @@ golangci-lint run --default=none --enable=govet --output.json.path=stdout
```

</details>

Do not print issued lines, output results to stdout without colors in text format, and to `gl-code-quality-report.json` file in Code Climate's format:

<details>
<summary style={{color: '#737380', paddingLeft: '1rem'}}>v1</summary>

```bash
golangci-lint run --print-issued-lines=false --out-format code-climate:gl-code-quality-report.json,line-number
```

</details>

<details>
<summary style={{color: '#737380', paddingLeft: '1rem'}}>v2</summary>

```bash
golangci-lint run --output.text.path=stdout --output.text.colors=false --output.text.print-issued-lines=false --output.code-climate.path=gl-code-quality-report.json
```

</details>
Loading