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

assert(false) should be exempt from the assert message check #874

Open
Moth-Tolias opened this issue Jul 20, 2022 · 1 comment
Open

assert(false) should be exempt from the assert message check #874

Moth-Tolias opened this issue Jul 20, 2022 · 1 comment

Comments

@Moth-Tolias
Copy link
Contributor

since assert(false) has the specific meaning of "unreachable code", it should be exempt from the assert message check as to add one would be needless repetition.

@VPanteleev-S7
Copy link

I think the same rationale for why it makes sense to warn on missing messages for assert(condition) also applies to assert(false). In both cases, in debug builds, you'd get a nondescript "Assertion failure" message, which the linter rule exists to avoid. The only practical difference is what happens in -release builds, but that seems orthogonal to the aspects concerning the linter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants