lint: remove unnecessary negation

Also use double-brackets where possible.

Fixes SC2236
This commit is contained in:
Jose Diaz-Gonzalez
2019-02-02 13:52:18 -05:00
parent 67ae374e60
commit c7b71b5d92
9 changed files with 15 additions and 15 deletions

View File

@@ -168,7 +168,7 @@ dokku_container_log_verbose_quiet() {
is_valid_app_name() {
declare desc="verify app name format"
local APP="$1"
[[ ! -n "$APP" ]] && dokku_log_fail "APP must not be null"
[[ -z "$APP" ]] && dokku_log_fail "APP must not be null"
if [[ "$APP" =~ ^[a-z].* ]] || [[ "$APP" =~ ^[0-9].* ]]; then
if [[ ! $APP =~ [A-Z] ]] && [[ ! $APP =~ [:] ]]; then
return 0