40 ms·
If you want, you can disallow implicit conversion between boolean and number using a linter.
by LudwigNagasena 4y ago
If you want, you can disallow implicit conversion between boolean and number using a linter.
- quietbritishjim 4y agoI imagine that you'd get a load of false positives due to textual inclusion of header files.
- jcelerier 4y agoCompilers have no trouble ignoring header files outside of your project for the sake of warnings with -isystem instead of -I, it's not different for linters
- inetknght 4y ago> Compilers have no trouble ignoring header files outside of your project for the sake of warnings with -isystem instead of -I, it's not different for linters In this [0] example I shared in other related comments, the static analyzer suppressed warnings in such headers. > 126 warnings generated. > Suppressed 124 warnings (124 in non-user code). [0]: https://gcc.godbolt.org/z/nK7MdEcMj https://gcc.godbolt.org/z/nK7MdEcMj
- josefx 4y agoAny linter that gets confused by includes would be rather useless, it couldn't even print the correct line numbers for any errors it finds.
- orwin 4y agoOr with -Wimplicit.
- synergy20 4y agothat's only for c, not for c++