diff options
author | Nils Gillmann <ng0@n0.is> | 2018-05-19 16:02:18 +0000 |
---|---|---|
committer | Nils Gillmann <ng0@n0.is> | 2018-05-19 16:02:18 +0000 |
commit | 8b28cb7236c887c7a1cc21673e44ea81047f86db (patch) | |
tree | dc2a3084b1d6d7dc54213d35b9fc250a4f71c82d | |
parent | 614bd54d90da0cb680f59bfd147c25c42df00feb (diff) | |
download | gnunet-8b28cb7236c887c7a1cc21673e44ea81047f86db.tar.gz gnunet-8b28cb7236c887c7a1cc21673e44ea81047f86db.zip |
contrib/scripts: lint-python.sh, small wrapper
Signed-off-by: Nils Gillmann <ng0@n0.is>
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | contrib/scripts/lint-python.sh | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index b36fa3b1c..a85b26cd8 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -50,3 +50,4 @@ src/identity-provider/gnunet-idp | |||
50 | src/namestore/perf_namestore_api_zone_iteration_flat | 50 | src/namestore/perf_namestore_api_zone_iteration_flat |
51 | src/namestore/perf_namestore_api_zone_iteration_postgres | 51 | src/namestore/perf_namestore_api_zone_iteration_postgres |
52 | src/namestore/perf_namestore_api_zone_iteration_sqlite | 52 | src/namestore/perf_namestore_api_zone_iteration_sqlite |
53 | python-lint.log | ||
diff --git a/contrib/scripts/lint-python.sh b/contrib/scripts/lint-python.sh new file mode 100755 index 000000000..9f7e0462d --- /dev/null +++ b/contrib/scripts/lint-python.sh | |||
@@ -0,0 +1,24 @@ | |||
1 | #!/bin/sh | ||
2 | # check python style (and 2 to 3 migration) | ||
3 | |||
4 | rm python-lint.log | ||
5 | |||
6 | if [ -e "python" ] | ||
7 | then | ||
8 | python --version >> python-lint.log | ||
9 | fi | ||
10 | |||
11 | if [ -e "python2" ] | ||
12 | then | ||
13 | python2 --version >> python-lint.log | ||
14 | fi | ||
15 | |||
16 | if [ -e "python3" ] | ||
17 | then | ||
18 | python3 --version >> python-lint.log | ||
19 | fi | ||
20 | |||
21 | flake8 >> python-lint.log | ||
22 | |||
23 | 2to3 -v -d . >> python-lint.log | ||
24 | 2to3 -v -p . >> python-lint.log | ||