aboutsummaryrefslogtreecommitdiff
path: root/.pvs-studio.sh
diff options
context:
space:
mode:
authorMario Trangoni <mjtrangoni@gmail.com>2020-06-06 16:01:31 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-06-29 22:09:03 +0200
commit61859da35edd6eada211eb630bf8ffa2d26288c1 (patch)
tree5b3bc826e66c7fac8eaba7f9261a7715d4c3202f /.pvs-studio.sh
parenta3d493a60de3c704b252775205bcafc3a175c853 (diff)
downloadnx-libs-61859da35edd6eada211eb630bf8ffa2d26288c1.tar.gz
nx-libs-61859da35edd6eada211eb630bf8ffa2d26288c1.tar.bz2
nx-libs-61859da35edd6eada211eb630bf8ffa2d26288c1.zip
travis-ci: add PVS Studio
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
Diffstat (limited to '.pvs-studio.sh')
-rw-r--r--.pvs-studio.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/.pvs-studio.sh b/.pvs-studio.sh
new file mode 100644
index 000000000..cf9f0d1ee
--- /dev/null
+++ b/.pvs-studio.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+before_install() {
+ if [ "$PVS_ANALYZE" = "yes" ]; then
+ sudo wget -q -O - https://files.viva64.com/etc/pubkey.txt | sudo apt-key add -
+ sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.viva64.com/etc/viva64.list
+ sudo apt-get update -qq
+ sudo apt-get install -qq pvs-studio
+ else
+ echo "not installing PVS-Studio"
+ fi
+}
+
+build_script() {
+ if [ "$PVS_ANALYZE" = "yes" ]; then
+ pvs-studio-analyzer credentials "${PVS_USERNAME}" "${PVS_KEY}" -o PVS-Studio.lic
+ pvs-studio-analyzer trace -- make -j2
+ pvs-studio-analyzer analyze --quiet -j2 -l PVS-Studio.lic -o "PVS-Studio-${CC}.log"
+ plog-converter -a "GA:1,2" -t tasklist -o "PVS-Studio-${CC}.tasks" "PVS-Studio-${CC}.log"
+ cat "PVS-Studio-${CC}.tasks"
+ else
+ make -j2
+ fi
+}
+
+set -e
+set -x
+
+$1;