Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add directory with Coverity stuff, uploaded modeling file #2684

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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__();
}
Loading