diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/jaegertracing/thrift/build/docker/scripts/sca.sh | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/jaegertracing/thrift/build/docker/scripts/sca.sh')
-rwxr-xr-x | src/jaegertracing/thrift/build/docker/scripts/sca.sh | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/jaegertracing/thrift/build/docker/scripts/sca.sh b/src/jaegertracing/thrift/build/docker/scripts/sca.sh new file mode 100755 index 000000000..42128fc67 --- /dev/null +++ b/src/jaegertracing/thrift/build/docker/scripts/sca.sh @@ -0,0 +1,58 @@ +#!/bin/bash +set -ev + +# +# Generate thrift files so the static code analysis includes an analysis +# of the files the thrift compiler spits out. If running interactively +# set the NOBUILD environment variable to skip the boot/config/make phase. +# + +if [[ -z "$NOBUILD" ]]; then + ./bootstrap.sh + ./configure --enable-tutorial=no + make -j3 precross +fi + +# +# C/C++ static code analysis with cppcheck +# add --error-exitcode=1 to --enable=all as soon as everything is fixed +# +# Python code style check with flake8 +# +# search for TODO etc within source tree +# some statistics about the code base +# some info about the build machine + +# Compiler cppcheck (All) +cppcheck --force --quiet --inline-suppr --enable=all -j2 compiler/cpp/src + +# C++ cppcheck (All) +cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp + +# C Glib cppcheck (All) +cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib + +# Silent error checks +# See THRIFT-4371 : flex generated code triggers "possible null pointer dereference" in yy_init_buffer +cppcheck --force --quiet --inline-suppr --suppress="*:thrift/thriftl.cc" --error-exitcode=1 -j2 compiler/cpp/src +cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp +cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib + +# Python code style +flake8 + +# PHP code style +composer install --quiet +./vendor/bin/phpcs + +# TODO etc +echo FIXMEs: `grep -r FIXME * | wc -l` +echo HACKs: `grep -r HACK * | wc -l` +echo TODOs: `grep -r TODO * | wc -l` + +# LoC +sloccount . + +# System Info +dpkg -l +uname -a |