Skip to content

util/must: add linter for FatalOn and PanicOn #107426

@erikgrinaker

Description

@erikgrinaker

FatalOn and PanicOn should not be used for general-purpose errors, only must assertion failures. There is no functional reason why this is problematic, but it can lead to confusion about the distinction between assertions and error handling.

We should add a linter for this, enforcing that the argument must be a must function call.

Jira issue: CRDB-30036

Metadata

Metadata

Assignees

Labels

A-testingTesting tools and infrastructureC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-testengTestEng Team

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions