Skip to content

Commit

Permalink
More flexible run_linter.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
fwkz committed Sep 5, 2016
1 parent e6a9114 commit ed0973b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions run_linter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ GREEN='\033[0;32m'
YELLOW='\033[0;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
MODULES_PATH=./routersploit/modules

MODULES_PATH=./routersploit
FAILURE=0

if [ "$1" ]; then
MODULES_PATH="$MODULES_PATH/$1"
fi

FLAKE8_IGNORED_RULES='E501,W503'
FLAKE8=$(flake8 --ignore=$FLAKE8_IGNORED_RULES $MODULES_PATH)
FLAKE8=$(flake8 --exclude=__init__.py --ignore=$FLAKE8_IGNORED_RULES $MODULES_PATH)

if [ "$FLAKE8" ]; then
echo -e "\n${RED}- flake8 violations:${NC}"
Expand Down

0 comments on commit ed0973b

Please sign in to comment.