Skip to content

Commit 9f78722

Browse files
committed
review
1 parent 4f8827d commit 9f78722

File tree

1 file changed

+31
-39
lines changed

1 file changed

+31
-39
lines changed

docs/src/docs/product/migration-guide.mdx

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ Settings for `gci`, `gofmt`, `gofumpt`, `goimports` are moved to the `formatters
400400
```yaml
401401
linters-settings:
402402
govet:
403-
disable-all: true
403+
enable-all: true
404404
gofmt:
405405
simplify: false
406406
```
@@ -414,7 +414,7 @@ linters-settings:
414414
linters:
415415
settings:
416416
govet:
417-
disable-all: true
417+
enable-all: true
418418
419419
formatters:
420420
settings:
@@ -637,7 +637,7 @@ linters:
637637

638638
</details>
639639

640-
#### `linters-settings.forbidigo.forbid[].rawPattern`
640+
#### `linters-settings.forbidigo.forbid[]<pattern>`
641641

642642
The `pattern` has become mandatory for the `forbid` field.
643643

@@ -821,7 +821,7 @@ linters:
821821

822822
#### `linters-settings.predeclared.ignore`
823823

824-
This string option has been replaced with the slice option `linters.settings.predeclared.ignore`.
824+
This string option has been replaced with the slice option with the same name.
825825

826826
<details>
827827
<summary>v1</summary>
@@ -1031,7 +1031,7 @@ linters-settings:
10311031

10321032
#### `linters-settings.wrapcheck.ignoreInterfaceRegexps`
10331033

1034-
This option has been replaced with `linters.settings.wrapcheck.ignore-interface-regexps`.
1034+
This option has been renamed to `linters.settings.wrapcheck.ignore-interface-regexps`.
10351035

10361036
<details>
10371037
<summary>v1</summary>
@@ -1060,7 +1060,7 @@ linters:
10601060

10611061
#### `linters-settings.wrapcheck.ignorePackageGlobs`
10621062

1063-
This option has been replaced with `linters.settings.wrapcheck.ignore-package-globs`.
1063+
This option has been renamed to `linters.settings.wrapcheck.ignore-package-globs`.
10641064

10651065
<details>
10661066
<summary>v1</summary>
@@ -1089,7 +1089,7 @@ linters:
10891089

10901090
#### `linters-settings.wrapcheck.ignoreSigRegexps`
10911091

1092-
This option has been replaced with `linters.settings.wrapcheck.ignore-sig-regexps`.
1092+
This option has been renamed to `linters.settings.wrapcheck.ignore-sig-regexps`.
10931093

10941094
<details>
10951095
<summary>v1</summary>
@@ -1118,7 +1118,7 @@ linters:
11181118

11191119
#### `linters-settings.wrapcheck.ignoreSigs`
11201120

1121-
This option has been replaced with `linters.settings.wrapcheck.ignore-sigs`.
1121+
This option has been renamed to `linters.settings.wrapcheck.ignore-sigs`.
11221122

11231123
<details>
11241124
<summary>v1</summary>
@@ -1167,22 +1167,25 @@ output:
11671167
```yaml
11681168
output:
11691169
formats:
1170+
checkstyle:
1171+
path: 'report.xml'
1172+
json:
1173+
path: stdout
11701174
text:
11711175
path: stdout
11721176
color: true
1173-
json:
1174-
path: stdout
1175-
checkstyle:
1176-
path: 'report.xml'
11771177
```
11781178

11791179
</details>
11801180

1181-
#### `output.formats[].format: name`
1181+
#### `output.formats[].format: <name>`
1182+
1183+
The property `output.formats[].format` has been replaced with `output.formats[].<format_name>`.
11821184

1183-
The property `output.formats[].format` has been replaced with `output.formats[].formatName`.
1185+
The formats `colored-line-number`, `colored-tab` have been replaced by an option `colors`:
11841186

1185-
The formats `colored-line-number`, `colored-tab` has been removed. Use `output.formats[].text.colors: true` and `output.formats[].tab.colors: true` instead.
1187+
- `output.formats[].text.colors: true`
1188+
- `output.formats[].tab.colors: true`.
11861189

11871190
<details>
11881191
<summary>v1</summary>
@@ -1222,11 +1225,13 @@ This property is `true` by default.
12221225

12231226
#### `output.sort-order`
12241227

1225-
This property has new default: [`linter`, `file`] instead of [`file`].
1228+
This property has new default: `['linter', 'file']` instead of `['file']`.
12261229

12271230
#### `output.sort-results`
12281231

1229-
The property has been removed. The output results are always sorted.
1232+
The property has been removed.
1233+
1234+
The output results are always sorted.
12301235

12311236
#### `output.uniq-by-line`
12321237

@@ -1485,29 +1490,16 @@ linters:
14851490

14861491
#### `linters.fast`
14871492

1488-
This property has been replaced with `linters.default: fast`. It is not a strictly equivalent.
1489-
1490-
<details>
1491-
<summary>v1</summary>
1492-
1493-
```yaml
1494-
linters:
1495-
fast: true
1496-
```
1497-
1498-
</details>
1499-
1500-
<details>
1501-
<summary>v2</summary>
1502-
1503-
```yaml
1504-
linters:
1505-
default: fast
1506-
```
1493+
This property has been removed.
15071494

1508-
</details>
1495+
There are 2 new options (they are not strictly equivalent to the previous option):
15091496

1510-
Also, the new flag option `--fast-only` filters enabled linters to keep only "fast" linters.
1497+
1. `linters.default: fast`: set all "fast" linters as the default set of linters.
1498+
```yaml
1499+
linters:
1500+
default: fast
1501+
```
1502+
2. `--fast-only`: filters all enabled linters to keep only "fast" linters.
15111503

15121504
#### `linters.presets`
15131505

@@ -1687,7 +1679,7 @@ Presets:
16871679

16881680
The alternative linters has been removed.
16891681

1690-
| Alt Name V1 | V2 Name |
1682+
| Alt Name v1 | Name v2 |
16911683
|-------------|---------------|
16921684
| `gas` | `gosec` |
16931685
| `goerr113` | `err113` |

0 commit comments

Comments
 (0)