Skip to content

Commit f30e6d3

Browse files
committed
Add directory with Coverity stuff, uploaded modeling file
1 parent 6a70aa0 commit f30e6d3

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

coverity/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Coverity settings/configuration
2+
3+
We use Coverity scan for static code analysis. This directory contains
4+
[configuration](https://scan.coverity.com/projects/domjudge?tab=analysis_settings)
5+
that has also been uploaded toCoverity, but is also stored here for
6+
visibility and tracking.
7+
8+
The file `modeling.c` is used to explicitly tell the analysis engine
9+
which code paths terminate execution and related things.
10+
11+
The file `components.csv` lists which components we have configured
12+
and whether they are ignored (for external code) in the analysis.

coverity/components.tsv

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Component name Pattern Ignore in analysis
2+
Included standard libraries /usr/include/.* Yes
3+
External JS libraries /webapp/web/js/(ace/.*|flot/.*|jquery\..*\.js) No
4+
Generated cache files in var /webapp/var/cache/.* Yes
5+
Generated doc build files /doc/manual/build/.* Yes
6+
Symfony external resources /webapp/resources/.* Yes
7+
External PHP libraries /webapp/vendor/.* Yes

coverity/modeling.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* To be uploaded to scan.coverity.com as modeling file to exclude
2+
* false positives because it does not detect that error() always
3+
* terminates the program.
4+
*/
5+
6+
void error(int errnum, const char *format, ...) {
7+
__coverity_panic__();
8+
}

0 commit comments

Comments
 (0)