Commit 1af48ef
committed
ci(lint): resolve golangci-lint v2 findings on existing main
Lint v2 has stricter defaults than the v1.51 the repo used previously,
surfacing pre-existing issues that v1 silently ignored. None of these
are bugs introduced by the security bump; they're cleanups so the
upgraded linter runs clean.
- .golangci.yml: depguard v2 no longer auto-allows the project's own
third-party deps — list them explicitly so legitimate imports of
go-retryablehttp, oauth2, thrift, jwt/v5, etc. don't trip the rule.
Drop the v2-invalid `gosec.exclude-generated` key (the linter now
config-verifies and would refuse to start with it present).
- Makefile: bump local install target from golangci-lint@v1.51.0 to
v2.12.2 (matches the version the v9.2.1 GitHub Action installs).
- parameters.go: reflect.Ptr -> reflect.Pointer (Ptr is the legacy
alias kept for backwards compat; govet's `inline` check flags it).
- internal/rows/rows.go: complete the //nolint:gosec annotation block
the original PR author added on the very next line — the int32
conversion on line 183 is in the same telemetry counter scope.
- telemetry/aggregator_test.go: //nolint:gosec on test-only counter.
- connection_test.go: //nolint:gosec on os.ReadFile(localFile) — the
filename comes from a deterministic httptest fixture path.
- internal/client/client.go: //nolint:staticcheck on the deprecated
thrift.StdLogger sentinel — it's a no-op since thrift v0.13 but
remains the documented argument type for NewTDebugProtocolFactoryWithLogger.
Local lint run after these changes: 0 issues.
Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>1 parent cf77582 commit 1af48ef
7 files changed
Lines changed: 22 additions & 8 deletions
File tree
- internal
- client
- rows
- telemetry
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
27 | 40 | | |
28 | | - | |
29 | 41 | | |
30 | 42 | | |
31 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2116 | 2116 | | |
2117 | 2117 | | |
2118 | 2118 | | |
2119 | | - | |
| 2119 | + | |
2120 | 2120 | | |
2121 | 2121 | | |
2122 | 2122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
0 commit comments