James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | set -ev |
| 3 | |
| 4 | # |
| 5 | # C/C++ static code analysis with cppcheck |
| 6 | # add --error-exitcode=1 to --enable=all as soon as everything is fixed |
| 7 | # |
| 8 | # Python code style check with flake8 |
| 9 | # |
| 10 | # search for TODO etc within source tree |
| 11 | # some statistics about the code base |
| 12 | # some info about the build machine |
| 13 | |
| 14 | # Compiler cppcheck (All) |
| 15 | cppcheck --force --quiet --inline-suppr --enable=all -j2 compiler/cpp/src |
| 16 | |
| 17 | # C++ cppcheck (All) |
| 18 | cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp |
| 19 | |
| 20 | # C Glib cppcheck (All) |
| 21 | cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib |
| 22 | |
| 23 | # Silent error checks |
| 24 | cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 compiler/cpp/src |
| 25 | cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp |
| 26 | cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib |
| 27 | |
| 28 | # Python code style |
| 29 | flake8 --ignore=E501 lib/py |
| 30 | flake8 tutorial/py |
| 31 | flake8 --ignore=E501 test/py |
| 32 | flake8 test/py.twisted |
| 33 | flake8 test/py.tornado |
| 34 | flake8 --ignore=E501 test/test.py |
| 35 | flake8 --ignore=E501 test/crossrunner |
| 36 | flake8 test/features |
| 37 | |
| 38 | # TODO etc |
| 39 | echo FIXMEs: `grep -r FIXME * | wc -l` |
| 40 | echo HACKs: `grep -r HACK * | wc -l` |
| 41 | echo TODOs: `grep -r TODO * | wc -l` |
| 42 | |
| 43 | # LoC |
| 44 | sloccount . |
| 45 | |
| 46 | # System Info |
| 47 | dpkg -l |
| 48 | uname -a |