Skip to content

Commit

Permalink
Added: wrapper for flake8 to avoid lint check in python 2.6 because f…
Browse files Browse the repository at this point in the history
…lake8 don't work with 2.6.
  • Loading branch information
strizhechenko committed Jun 24, 2017
1 parent e8239c5 commit 2d86108
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ clean:
find . -name '*~' -exec rm -f {} \;

lint:
flake8 netutils_linux_monitoring netutils_linux_tuning netutils_linux_hardware
./flake8.sh netutils_linux_monitoring netutils_linux_tuning netutils_linux_hardware

coverage:
nosetests --with-coverage --cover-package=twitter
Expand Down
8 changes: 8 additions & 0 deletions flake8.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if python --version 2>&1 | grep -qi 'Python 2.6'; then
echo "WARNING: flake8 doesn't support 2.6, skip linting (it'll be done in 2.7/3.4/3.6 checks)"
exit 0
fi

flake8 "$@"

0 comments on commit 2d86108

Please sign in to comment.