-
Notifications
You must be signed in to change notification settings - Fork 4.1k
util/must: add linter for FatalOn and PanicOn #107426
Copy link
Copy link
Closed
Labels
A-testingTesting tools and infrastructureTesting tools and infrastructureC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-testengTestEng TeamTestEng Team
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-testingTesting tools and infrastructureTesting tools and infrastructureC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-testengTestEng TeamTestEng Team