Commit a6adab9
committed
gopls/internal/analysis/modernize: check FileVersions throughout
This CL ensures that every modernizer sub-pass checks the effective
Go version of each file before inspecting that file, using
a version-filtering *ast.File iterator, something enabled by
Cursors.
It does increase indentation by a level though, so I split
some of the deeper function into outer and inner parts.
Change-Id: I2bcd059c4f52af5673a7d1e9f07ff9463dce96b0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/638698
Reviewed-by: Robert Findley <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>1 parent c437d40 commit a6adab9
File tree
7 files changed
+356
-351
lines changed- gopls/internal/analysis/modernize
7 files changed
+356
-351
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
85 | | - | |
86 | | - | |
| 84 | + | |
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
98 | 91 | | |
99 | 92 | | |
100 | 93 | | |
| |||
108 | 101 | | |
109 | 102 | | |
110 | 103 | | |
111 | | - | |
| 104 | + | |
112 | 105 | | |
113 | 106 | | |
114 | 107 | | |
| |||
129 | 122 | | |
130 | 123 | | |
131 | 124 | | |
132 | | - | |
| 125 | + | |
133 | 126 | | |
134 | 127 | | |
135 | 128 | | |
| |||
153 | 146 | | |
154 | 147 | | |
155 | 148 | | |
156 | | - | |
| 149 | + | |
157 | 150 | | |
158 | 151 | | |
159 | 152 | | |
160 | 153 | | |
161 | 154 | | |
162 | | - | |
163 | | - | |
| 155 | + | |
164 | 156 | | |
165 | 157 | | |
166 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
| 15 | + | |
17 | 16 | | |
18 | | - | |
19 | 17 | | |
20 | | - | |
21 | | - | |
22 | 18 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
29 | 24 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
0 commit comments