D-Scanner icon indicating copy to clipboard operation
D-Scanner copied to clipboard

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

Open Moth-Tolias opened this issue 3 years ago • 1 comments

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.

Moth-Tolias avatar Jul 20 '22 03:07 Moth-Tolias

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.

vpanteleev-sym avatar Oct 13 '24 10:10 vpanteleev-sym