2 ms·
I imagine that you'd get a load of false positives due to textual inclusion of header files.
by quietbritishjim 4y ago
I 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.