bashate: Enable E003 rule
It seems there are not many lines using 2 spaces now, and the rule can be easily enabled. Change-Id: I54ede1fb83b8a150392f9b8c498ea5fa81ef38c0
This commit is contained in:
parent
34e8dbd49f
commit
4debb6c494
|
@ -25,7 +25,7 @@
|
||||||
# $3 is assumed to be the factory debug level, e.g. DEBUG
|
# $3 is assumed to be the factory debug level, e.g. DEBUG
|
||||||
|
|
||||||
if [ $1 == "debug" ]; then
|
if [ $1 == "debug" ]; then
|
||||||
$2
|
$2
|
||||||
else
|
else
|
||||||
PYTHONPATH='/usr/local/lib/storlets/python' /usr/local/libexec/storlets/storlets-daemon-factory $2 $3 $HOSTNAME
|
PYTHONPATH='/usr/local/lib/storlets/python' /usr/local/libexec/storlets/storlets-daemon-factory $2 $3 $HOSTNAME
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -158,15 +158,15 @@ function _install_docker {
|
||||||
# containers without sudo
|
# containers without sudo
|
||||||
sudo grep -q docker /etc/group
|
sudo grep -q docker /etc/group
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
sudo groupadd docker
|
sudo groupadd docker
|
||||||
fi
|
fi
|
||||||
add_user_to_group $STORLETS_SWIFT_RUNTIME_USER docker
|
add_user_to_group $STORLETS_SWIFT_RUNTIME_USER docker
|
||||||
|
|
||||||
if [ $STORLETS_SWIFT_RUNTIME_USER == $USER ]; then
|
if [ $STORLETS_SWIFT_RUNTIME_USER == $USER ]; then
|
||||||
# NOTE(takashi): We need this workaroud because we can't reload
|
# NOTE(takashi): We need this workaroud because we can't reload
|
||||||
# user-group relationship in bash scripts
|
# user-group relationship in bash scripts
|
||||||
DOCKER_UNIX_SOCKET=/var/run/docker.sock
|
DOCKER_UNIX_SOCKET=/var/run/docker.sock
|
||||||
sudo chown $USER:$USER $DOCKER_UNIX_SOCKET
|
sudo chown $USER:$USER $DOCKER_UNIX_SOCKET
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restart docker daemon
|
# Restart docker daemon
|
||||||
|
@ -177,9 +177,9 @@ function prepare_storlets_install {
|
||||||
_install_docker
|
_install_docker
|
||||||
|
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
install_package openjdk-${STORLETS_JDK_VERSION}-jdk-headless ant
|
install_package openjdk-${STORLETS_JDK_VERSION}-jdk-headless ant
|
||||||
else
|
else
|
||||||
die $LINENO "Unsupported distro"
|
die $LINENO "Unsupported distro"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_python3
|
install_python3
|
||||||
|
|
28
s2aio.sh
28
s2aio.sh
|
@ -111,24 +111,24 @@ function uninstall_s2aio {
|
||||||
|
|
||||||
COMMAND="$1"
|
COMMAND="$1"
|
||||||
case $COMMAND in
|
case $COMMAND in
|
||||||
"install" )
|
"install" )
|
||||||
install_s2aio
|
install_s2aio
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"uninstall" )
|
"uninstall" )
|
||||||
uninstall_s2aio
|
uninstall_s2aio
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"start" )
|
"start" )
|
||||||
start_s2aio
|
start_s2aio
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"stop" )
|
"stop" )
|
||||||
stop_s2aio
|
stop_s2aio
|
||||||
;;
|
;;
|
||||||
|
|
||||||
* )
|
* )
|
||||||
usage
|
usage
|
||||||
esac
|
esac
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
|
3
tox.ini
3
tox.ini
|
@ -68,14 +68,13 @@ commands = oslo_debug_helper {posargs}
|
||||||
[testenv:bashate]
|
[testenv:bashate]
|
||||||
# Run bashate check for all bash scripts
|
# Run bashate check for all bash scripts
|
||||||
# Ignores the following rules:
|
# Ignores the following rules:
|
||||||
# E003: Indent not multiple of 4 (we prefer to use multiples of 2)
|
|
||||||
# E006: Line longer than 79 columns
|
# E006: Line longer than 79 columns
|
||||||
commands =
|
commands =
|
||||||
bash -c "grep --recursive --binary-files=without-match \
|
bash -c "grep --recursive --binary-files=without-match \
|
||||||
--files-with-match '^.!.*\(ba\)\?sh$' \
|
--files-with-match '^.!.*\(ba\)\?sh$' \
|
||||||
--exclude-dir .tox \
|
--exclude-dir .tox \
|
||||||
--exclude-dir .git \
|
--exclude-dir .git \
|
||||||
{toxinidir} | xargs bashate --error . --verbose --ignore=E003,E006"
|
{toxinidir} | xargs bashate --error . --verbose --ignore=E006"
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E123, E125 skipped as they are invalid PEP-8.
|
# E123, E125 skipped as they are invalid PEP-8.
|
||||||
|
|
Loading…
Reference in New Issue