diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-05-11 12:10:39 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-06-02 11:18:47 +0200 |
| commit | 9d2275763919023653fabcac9db720e60630472c (patch) | |
| tree | 803fa48c6a4363dde8c00ae436ae35454881c18e /tools | |
| parent | 628c3eefd6bed9f5b8195b08566713dc6ba0420c (diff) | |
| download | allocbench-9d2275763919023653fabcac9db720e60630472c.tar.gz allocbench-9d2275763919023653fabcac9db720e60630472c.zip | |
Makefile: add new pylint check-target which fails on errors and warnings
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/check-pylint | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/check-pylint b/tools/check-pylint new file mode 100755 index 0000000..ce1ef30 --- /dev/null +++ b/tools/check-pylint @@ -0,0 +1,20 @@ +#!/bin/bash + +PYLINT_EXIT=$? +# pylint error masks + +FATAL_MASK=1 +ERROR_MASK=2 +WARNING_MASK=4 +REFACTRO_MASK=8 +CONVENTION_MASK=16 +USAGE_ERROR_MASK=32 + +# fail on fatal +[[ $(( $PYLINT_EXIT & $FATAL_MASK )) -gt 0 ]] && exit $PYLINT_EXIT + +# fail on error +[[ $(( $PYLINT_EXIT & $ERROR_MASK )) -gt 0 ]] && exit $PYLINT_EXIT + +# fail on warning +[[ $(( $PYLINT_EXIT & $WARNING_MASK )) -gt 0 ]] && exit $PYLINT_EXIT |
