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
101 changes: 101 additions & 0 deletions docs/src/docs/product/migration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2046,3 +2046,104 @@ version: "2"
```

</details>

### Command Line Flags

The following flags have been removed:

- `--disable-all`
- `--enable-all`
- `-p, --presets`
- `--fast`
- `-e, --exclude`
- `--exclude-case-sensitive`
- `--exclude-dirs-use-default`
- `--exclude-dirs`
- `--exclude-files`
- `--exclude-generated`
- `--exclude-use-default`
- `--go string`
- `--sort-order`
- `--sort-results`
- `--out-format`

#### `--out-format`

`--out-format` has been replaced with the following flags:

```bash
# Previously 'colored-line-number' and 'line-number'
--output.text.path
--output.text.print-linter-name
--output.text.print-issued-lines
--output.text.colors
```

```bash
# Previously 'json'
--output.json.path
```

```bash
# Previously 'colored-tab' and 'tab'
--output.tab.path
--output.tab.print-linter-name
--output.tab.colors
```

```bash
# Previously 'html'
--output.html.path
```

```bash
# Previously 'checkstyle'
--output.checkstyle.path
```

```bash
# Previously 'code-climate'
--output.code-climate.path
```

```bash
# Previously 'junit-xml' and 'junit-xml-extended'
--output.junit-xml.path
--output.junit-xml.extended
```

```bash
# Previously 'teamcity'
--output.teamcity.path
```

```bash
# Previously 'sarif'
--output.sarif.path
```

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

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

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

#### Example

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

```bash
golangci-lint run --disable-all --enable-only=govet --out-format=colored-tab --sort-order=linter --sort-results
```

</details>

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

```bash
golangci-lint run --default=none --enable-only=govet --out-format=colored-tab
```

</details>
Loading