mozilla / code-review

Automated static analysis & linting bot for Mozilla repositories
Mozilla Public License 2.0
55 stars 42 forks source link

Show compiler warnings on Phabricator #426

Open marco-c opened 4 years ago

marco-c commented 4 years ago

It would be nice to treat compiler warnings as SA/linting issues and publish them on Phabricator.

@abpostelnicu would it be feasible to collect them from the coverity job, like we do for build errors?

abpostelnicu commented 4 years ago

I had this chat with @sylvestre last week and I've raised the option to ditch Coverity error reporting since we don't have control other it, only on what's exposing it to us. I would move to clang-tidy for this since we already have the warning database. Also Coverity is not very good at forwarding warnings and only errors since those impact the build of each translation unit, thus the analysis process, but clang-tidy inherits the errors/warnings system from clang, so anything that clang outputs as a diagnostic message we catch it. Also there is a small caveat here, in order to catch the diagnostic messages that are errors we need an ErrorCollectionDatabase, currently we only have one for warnings but it's fairly easy to extend that one. That's why we moved in the first place withCoverity` since it seemed to be effortlessly.