| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The static analysis engine coverity allows for user models overriding how it treats functions when analyzing code. Like this, one can greatly reduce the rate of false positives and thus make it easier to spot actual errors. Add a user model that overrides function models for `git_buf_len` and `git_vector_insert`, which together amount for a majority of false positives.
The `git_buf` structure seems to be too complicated to correctly grasp for Coverity. As such, add simpler models trying to guide Coverity and remove false positives related to these functions.
|
Merging this I did upload the modeling file, we can iterate if it's not successful. |
Sorry, something went wrong.
|
While not fixing as much as I'd hoped, at least some bugs went away. Thanks for merging this. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
So by now more than half of the issues reported by Coverity can be labeled as false positives as the number of issues went down. I've written a user model that I am using to fix most of these false positives in my own fork, which brings down the number of issues from 37 to 14. Most of these issues are related to either git_vector or git_buf, which seem to be too complex to handle for Coverity.
I've split up this PR into two commits. The first commit includes the user model I am actually using right now. Due to an expired license (dunno why, I've contacted Coverity support but got no feedback until now) I am not able to update the user model, though, so I cannot test changes made in the second commit.
I'd be glad if this got accepted. Accepting alone won't help, though, as there seems to be no simple way of using the model when executing Coverity's tooling. Instead, someone needs to update the user model online. To do so, you'll have to go to scan.coverity.com, select the libgit2 project and then select the tab "Analysis Settings". There is a section "Modeling File" at the bottom where the file can be uploaded.