Use inspektor to check code style.
Change-Id: I8c238c785f8e5dbd585379cad0d4687d0d5b5ce2
Signed-off-by: Ruifeng Bian <rbian(a)redhat.com>
---
Makefile | 3 +++
selftests/check | 15 +++++++++++++++
2 files changed, 18 insertions(+)
create mode 100755 selftests/check
diff --git a/Makefile b/Makefile
index 91a95db..837f41d 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,9 @@ dist:
@echo " "
@echo "the archive is $(APP).tar.gz"
+check:
+ selftests/check
+
clean:
@find . -name "*.pyc" -exec rm -f {} \;
@rm -rf log/ log.xml
diff --git a/selftests/check b/selftests/check
new file mode 100755
index 0000000..f064651
--- /dev/null
+++ b/selftests/check
@@ -0,0 +1,15 @@
+#!/bin/bash
+ret=0
+run_cmd() {
+ echo "Running '$1'"
+ $1
+ if [ $? != 0 ]; then
+ ret=1
+ fi
+ echo ""
+}
+run_cmd 'inspekt lint'
+run_cmd 'inspekt indent'
+run_cmd 'inspekt style'
+exit ${ret}
+
--
2.4.3