Skip to content

Commit

Permalink
Add directory with Coverity stuff, uploaded modeling file
Browse files Browse the repository at this point in the history
  • Loading branch information
eldering committed Sep 17, 2024
1 parent 6a70aa0 commit f30e6d3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions coverity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Coverity settings/configuration

We use Coverity scan for static code analysis. This directory contains
[configuration](https://scan.coverity.com/projects/domjudge?tab=analysis_settings)
that has also been uploaded toCoverity, but is also stored here for
visibility and tracking.

The file `modeling.c` is used to explicitly tell the analysis engine
which code paths terminate execution and related things.

The file `components.csv` lists which components we have configured
and whether they are ignored (for external code) in the analysis.
7 changes: 7 additions & 0 deletions coverity/components.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Component name Pattern Ignore in analysis
Included standard libraries /usr/include/.* Yes
External JS libraries /webapp/web/js/(ace/.*|flot/.*|jquery\..*\.js) No
Generated cache files in var /webapp/var/cache/.* Yes
Generated doc build files /doc/manual/build/.* Yes
Symfony external resources /webapp/resources/.* Yes
External PHP libraries /webapp/vendor/.* Yes
8 changes: 8 additions & 0 deletions coverity/modeling.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* To be uploaded to scan.coverity.com as modeling file to exclude
* false positives because it does not detect that error() always
* terminates the program.
*/

void error(int errnum, const char *format, ...) {
__coverity_panic__();
}

0 comments on commit f30e6d3

Please sign in to comment.