postly / shell /lint.sh
andreped's picture
Include tests/ in lint
6bd9ae0
raw
history blame contribute delete
545 Bytes
#!/bin/bash
isort --check --sl -c postly/ tests/ app.py
if ! [ $? -eq 0 ]
then
echo "Please run \"sh shell/format.sh\" to format the code."
exit 1
fi
echo "no issues with isort"
flake8 --max-line-length 120 postly/ tests/ app.py
if ! [ $? -eq 0 ]
then
echo "Please fix the code style issue."
exit 1
fi
echo "no issues with flake8"
black --check --line-length 120 postly/ tests/ app.py
if ! [ $? -eq 0 ]
then
echo "Please run \"sh shell/format.sh\" to format the code."
exit 1
fi
echo "no issues with black"
echo "linting success!"