You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A linter that enforces calls to testthat::expect_error have a non-NULL regexp argument would be helpful to ensure tests that expect failure only fail with the specified error message and not for some unanticipated reason. This is analogous to pytest-raises-too-broad (PT011) in ruff.
This linter (or maybe separate linters) could naturally enforce a specific regexp for other testthat functions that have a regexp argument: expect_error, expect_warning, expect_message, and expect_condition.