Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
erikgrinaker opened this issue Jul 23, 2023 · 2 comments
Closed

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

erikgrinaker opened this issue Jul 23, 2023 · 2 comments
Assignees
Labels
A-testing Testing tools and infrastructure C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-testeng TestEng Team

Comments

@erikgrinaker
Copy link
Contributor

erikgrinaker commented Jul 23, 2023

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

@erikgrinaker erikgrinaker added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-testing Testing tools and infrastructure T-testeng TestEng Team labels Jul 23, 2023
@erikgrinaker erikgrinaker self-assigned this Jul 23, 2023
@blathers-crl
Copy link

blathers-crl bot commented Jul 23, 2023

cc @cockroachdb/test-eng

@erikgrinaker
Copy link
Contributor Author

must is no more, see #108272.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing Testing tools and infrastructure C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-testeng TestEng Team
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant