Quellcode durchsuchen

contrib/scripts: lint-python.sh, small wrapper

Signed-off-by: Nils Gillmann <ng0@n0.is>
Nils Gillmann vor 6 Jahren
Ursprung
Commit
8b28cb7236
2 geänderte Dateien mit 25 neuen und 0 gelöschten Zeilen
  1. 1 0
      .gitignore
  2. 24 0
      contrib/scripts/lint-python.sh

+ 1 - 0
.gitignore

@@ -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

+ 24 - 0
contrib/scripts/lint-python.sh

@@ -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