These checks absolutely should be part of the compiler (and this isn't a stylistic warning; it's a correctness warning). Our software ecosystem would have been in a far worse place if C compiler developers had decided to not support the -Wall switch in favor of lint(1). There's a lot more friction involved with using an external tool compared to just modifying CFLAGS.
if(0 != (i = getValue()))
if ((i = getValue())) if (0 != (0 != (i = getValue())))> if (i = 0)
instead of
> if (i == 0)
Clang lets you write plugins (which at least solves the code reuse problem), however, these are currently strongly coupled to the compiler version itself. See for example, the chromium guide to writing clang plugins "Don't Write A Clang Plugin"[1]
https://chromium.googlesource.com/chromium/src/+/master/docs...
if (condition) {
foo();
bar();
baz(); }