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
|
||||
|
||||
if [ $1 == "debug" ]; then
|
||||
$2
|
||||
$2
|
||||
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
|
||||
|
|
|
@ -158,15 +158,15 @@ function _install_docker {
|
|||
# containers without sudo
|
||||
sudo grep -q docker /etc/group
|
||||
if [ $? -ne 0 ]; then
|
||||
sudo groupadd docker
|
||||
sudo groupadd docker
|
||||
fi
|
||||
add_user_to_group $STORLETS_SWIFT_RUNTIME_USER docker
|
||||
|
||||
if [ $STORLETS_SWIFT_RUNTIME_USER == $USER ]; then
|
||||
# NOTE(takashi): We need this workaroud because we can't reload
|
||||
# user-group relationship in bash scripts
|
||||
DOCKER_UNIX_SOCKET=/var/run/docker.sock
|
||||
sudo chown $USER:$USER $DOCKER_UNIX_SOCKET
|
||||
# NOTE(takashi): We need this workaroud because we can't reload
|
||||
# user-group relationship in bash scripts
|
||||
DOCKER_UNIX_SOCKET=/var/run/docker.sock
|
||||
sudo chown $USER:$USER $DOCKER_UNIX_SOCKET
|
||||
fi
|
||||
|
||||
# Restart docker daemon
|
||||
|
@ -177,9 +177,9 @@ function prepare_storlets_install {
|
|||
_install_docker
|
||||
|
||||
if is_ubuntu; then
|
||||
install_package openjdk-${STORLETS_JDK_VERSION}-jdk-headless ant
|
||||
install_package openjdk-${STORLETS_JDK_VERSION}-jdk-headless ant
|
||||
else
|
||||
die $LINENO "Unsupported distro"
|
||||
die $LINENO "Unsupported distro"
|
||||
fi
|
||||
|
||||
install_python3
|
||||
|
|
28
s2aio.sh
28
s2aio.sh
|
@ -111,24 +111,24 @@ function uninstall_s2aio {
|
|||
|
||||
COMMAND="$1"
|
||||
case $COMMAND in
|
||||
"install" )
|
||||
install_s2aio
|
||||
;;
|
||||
"install" )
|
||||
install_s2aio
|
||||
;;
|
||||
|
||||
"uninstall" )
|
||||
uninstall_s2aio
|
||||
;;
|
||||
"uninstall" )
|
||||
uninstall_s2aio
|
||||
;;
|
||||
|
||||
"start" )
|
||||
start_s2aio
|
||||
;;
|
||||
"start" )
|
||||
start_s2aio
|
||||
;;
|
||||
|
||||
"stop" )
|
||||
stop_s2aio
|
||||
;;
|
||||
"stop" )
|
||||
stop_s2aio
|
||||
;;
|
||||
|
||||
* )
|
||||
usage
|
||||
* )
|
||||
usage
|
||||
esac
|
||||
|
||||
set +e
|
||||
|
|
3
tox.ini
3
tox.ini
|
@ -68,14 +68,13 @@ commands = oslo_debug_helper {posargs}
|
|||
[testenv:bashate]
|
||||
# Run bashate check for all bash scripts
|
||||
# Ignores the following rules:
|
||||
# E003: Indent not multiple of 4 (we prefer to use multiples of 2)
|
||||
# E006: Line longer than 79 columns
|
||||
commands =
|
||||
bash -c "grep --recursive --binary-files=without-match \
|
||||
--files-with-match '^.!.*\(ba\)\?sh$' \
|
||||
--exclude-dir .tox \
|
||||
--exclude-dir .git \
|
||||
{toxinidir} | xargs bashate --error . --verbose --ignore=E003,E006"
|
||||
{toxinidir} | xargs bashate --error . --verbose --ignore=E006"
|
||||
|
||||
[flake8]
|
||||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
|
|
Loading…
Reference in New Issue