ansible/test/utils/shippable/code-smell.sh

26 lines
689 B
Bash
Raw Normal View History

2016-06-02 04:08:14 +00:00
#!/bin/bash -eux
source_root=$(python -c "from os import path; print(path.abspath(path.join(path.dirname('$0'), '../../..')))")
install_deps="${INSTALL_DEPS:-}"
2016-06-02 04:08:14 +00:00
cd "${source_root}"
if [ "${install_deps}" != "" ]; then
apt-add-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports universe'
apt-get update -qq
apt-get install shellcheck
pip install -r "${source_root}/test/utils/shippable/code-smell-requirements.txt" --upgrade
pip list
fi
yamllint .
2016-06-02 04:08:14 +00:00
test/code-smell/replace-urlopen.sh .
test/code-smell/use-compat-six.sh lib
test/code-smell/boilerplate.sh
test/code-smell/required-and-default-attributes.sh
shellcheck \
test/utils/shippable/*.sh