@@ -5,43 +5,50 @@ title: Migration guide
55## Migrating configuration from v1 to v2
66
77Golangci-lint v2 has slightly different configuration options than v1.
8- Some options were renamed, some were moved, and some were removed.
8+ Some options were renamed, some were moved, some were split, and some were removed.
99Here is a guide how to migrate your v1 configuration.
1010
11- You can use ` golangci-lint ` itself to migrate your configuration through the ` migrate ` command:
11+ You can use ` golangci-lint ` itself to migrate your configuration automatically through the ` migrate ` command:
1212
1313``` sh
14- golangci-lint config migrate
14+ golangci-lint migrate
1515```
1616
1717In case you want to do it manually, here is a list of changes.
1818
19-
2019### ` linters ` configuration
2120
2221### ` linters-settings ` configuration
2322
23+ This section was removed in v2.
24+ Most linters settings are now in the ` linters.settings ` section.
25+ Settings for ` gci ` , ` gofmt ` , ` gofumpt ` , ` goimports ` are moved to the ` formatters.settings ` section.
26+
2427### ` issues ` configuration
2528
2629#### Removed
2730
28- * v1 *
31+ 1 . ` issues.exclude-case-sensitive ` option.
2932
33+ <details >
34+ <summary >v1</summary >
3035``` yaml
3136issues :
3237 exclude-case-sensitive : true
3338` ` `
39+ </details>
3440
35- *v2*
36-
41+ <details>
42+ <summary>v2</summary>
3743` issues.exclude` and `issues.exclude-rules` are case sensitive by default.
44+ </details>
3845
3946# ### Replaced
4047
41- # #### `exclude-dirs` and `exclude-files` with `exclusions.paths`
42-
43- *v1*
48+ 1. `exclude-dirs` and `exclude-files` with `exclusions.paths`.
4449
50+ <details>
51+ <summary>v1</summary>
4552` ` ` yaml
4653issues:
4754 exclude-dirs:
@@ -52,9 +59,11 @@ issues:
5259 - file1
5360 - file2
5461` ` `
62+ </details>
5563
56- *v2*
5764
65+ <details>
66+ <summary>v2</summary>
5867` ` ` yaml
5968linters:
6069 exclusions:
@@ -65,17 +74,6 @@ linters:
6574 - file2
6675` ` `
6776
68- ` ` ` yaml
69- issues:
70- exclude-dirs:
71- - dir1
72- - dir2
73-
74- exclude-files:
75- - file1
76- - file2
77- ` ` `
78-
7977# ## `output` configuration
8078
8179# ## `run` configuration
0 commit comments