File tree 2 files changed +85
-1
lines changed
2 files changed +85
-1
lines changed Original file line number Diff line number Diff line change 26
26
link : " /product/thanks/"
27
27
- label : " Changelog"
28
28
link : " /product/changelog/"
29
+ - label : " Migration Guide"
30
+ link : " /product/migration-guide/"
29
31
- label : " Roadmap"
30
32
link : " /product/roadmap/"
31
33
- label : " Performance"
54
56
link : /plugins/module-plugins/
55
57
- label : Go Plugin System
56
58
link : /plugins/go-plugins/
57
-
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Migration guide
3
+ ---
4
+
5
+ ## Migrating configuration from v1 to v2
6
+
7
+ Golangci-lint v2 has slightly different configuration options than v1.
8
+ Some options were renamed, some were moved, and some were removed.
9
+ Here is a guide how to migrate your v1 configuration.
10
+
11
+ You can use ` golangci-lint ` itself to migrate your configuration through the ` migrate ` command:
12
+
13
+ ``` sh
14
+ golangci-lint config migrate
15
+ ```
16
+
17
+ In case you want to do it manually, here is a list of changes.
18
+
19
+
20
+ ### ` linters ` configuration
21
+
22
+ ### ` linters-settings ` configuration
23
+
24
+ ### ` issues ` configuration
25
+
26
+ #### Removed
27
+
28
+ * v1*
29
+
30
+ ``` yaml
31
+ issues :
32
+ exclude-case-sensitive : true
33
+ ` ` `
34
+
35
+ *v2*
36
+
37
+ ` issues.exclude` and `issues.exclude-rules` are case sensitive by default.
38
+
39
+ # ### Replaced
40
+
41
+ # #### `exclude-dirs` and `exclude-files` with `exclusions.paths`
42
+
43
+ *v1*
44
+
45
+ ` ` ` yaml
46
+ issues:
47
+ exclude-dirs:
48
+ - dir1
49
+ - dir2
50
+
51
+ exclude-files:
52
+ - file1
53
+ - file2
54
+ ` ` `
55
+
56
+ *v2*
57
+
58
+ ` ` ` yaml
59
+ linters:
60
+ exclusions:
61
+ paths:
62
+ - dir1
63
+ - dir2
64
+ - file1
65
+ - file2
66
+ ` ` `
67
+
68
+ ` ` ` yaml
69
+ issues:
70
+ exclude-dirs:
71
+ - dir1
72
+ - dir2
73
+
74
+ exclude-files:
75
+ - file1
76
+ - file2
77
+ ` ` `
78
+
79
+ # ## `output` configuration
80
+
81
+ # ## `run` configuration
82
+
83
+ # ## `severity` configuration
You can’t perform that action at this time.
0 commit comments