contrib/scripts: lint-python.sh, small wrapper
authorNils Gillmann <ng0@n0.is>
Sat, 19 May 2018 16:02:18 +0000 (16:02 +0000)
committerNils Gillmann <ng0@n0.is>
Sat, 19 May 2018 16:02:18 +0000 (16:02 +0000)
Signed-off-by: Nils Gillmann <ng0@n0.is>
.gitignore
contrib/scripts/lint-python.sh [new file with mode: 0755]

index b36fa3b1c9bbfcee372515dc26a28de25c9143b1..a85b26cd8c64a2ffb8d6139cfecde28731af2473 100644 (file)
@@ -50,3 +50,4 @@ src/identity-provider/gnunet-idp
 src/namestore/perf_namestore_api_zone_iteration_flat
 src/namestore/perf_namestore_api_zone_iteration_postgres
 src/namestore/perf_namestore_api_zone_iteration_sqlite
+python-lint.log
diff --git a/contrib/scripts/lint-python.sh b/contrib/scripts/lint-python.sh
new file mode 100755 (executable)
index 0000000..9f7e046
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+# check python style (and 2 to 3 migration)
+
+rm python-lint.log
+
+if [ -e "python" ]
+then
+    python --version >> python-lint.log
+fi
+
+if [ -e "python2" ]
+then
+    python2 --version >> python-lint.log
+fi
+
+if [ -e "python3" ]
+then
+    python3 --version >> python-lint.log
+fi
+
+flake8 >> python-lint.log
+
+2to3 -v -d . >> python-lint.log
+2to3 -v -p . >> python-lint.log