2 ms·
> At my job we treat all warnings as errors Pretty sure what you actually mean is that you treat some warnings as errors, and disable the others. I would find
by dataflow 2y ago
> At my job we treat all warnings as errors
Pretty sure what you actually mean is that you treat some warnings as errors, and disable the others. I would find it hard to believe you're building with literally all the compiler warnings enabled all the time.
- connicpu 2y agoWe do have a couple disabled by default in the config, but it's still a lot of warnings: -Wall,-Wextra,-Werror,-Wno-type-limits,-Wno-attributes,-Wno-deprecated-declarations And of course some are suppressed with a pragma for a short section of specific segments of the code where you can make the argument that it's appropriate during code review, but those pragmas stick out like a sore thumb.
- dataflow 2y ago> We do have a couple disabled by default in the config, but it's still a lot of warnings A lot, yes, but definitely a lot more than 2 that you still don't have enabled. Might be worth looking into them if you haven't already -- you will definitely disable some of them in the process. (And I assume you already have clang-tidy, but if not, look into that too.)
- connicpu 2y agoYep, plus static analysis in CI. We also run ubasan, tsan, and valgrind on our unit tests.
- kelnos 2y ago-Wall + -Wextra doesn't actually enable all warning, though. There are quite a few others that you still have to enable manually.