Commit a36df4d
internal/lint: add linter rule to disallow panic(fmt.Sprintf())
Add a lint check that disallows panic(fmt.Sprintf(...)) in favor of
panic(errors.AssertionFailedf(...)). Using errors.AssertionFailedf
ensures panic messages are not redacted in CockroachDB logs and include
proper stack traces. The rule supports a lint:ignore PanicFmtSprintf
directive for cases where the pattern is intentionally retained.
Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>1 parent 0e1a672 commit a36df4d
1 file changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
194 | 212 | | |
195 | 213 | | |
196 | 214 | | |
| |||
0 commit comments