correct yamllint

This commit is contained in:
Alexandre
2021-12-27 15:48:59 +01:00
parent cb85d277ab
commit 80dcfdc765
8 changed files with 90 additions and 90 deletions

View File

@@ -26,7 +26,7 @@ if [ -f $CONFIGSOURCE ]; then
# Check if yaml is valid # Check if yaml is valid
EXIT_CODE=0 EXIT_CODE=0
yamllint -d relaxed --no-warnings $CONFIGSOURCE &> ERROR || EXIT_CODE=$? yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$?
if [ $EXIT_CODE = 0 ]; then if [ $EXIT_CODE = 0 ]; then
echo "Config file is a valid yaml" echo "Config file is a valid yaml"
else else

View File

@@ -26,7 +26,7 @@ if [ -f $CONFIGSOURCE ]; then
# Check if yaml is valid # Check if yaml is valid
EXIT_CODE=0 EXIT_CODE=0
yamllint -d relaxed --no-warnings $CONFIGSOURCE &> ERROR || EXIT_CODE=$? yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$?
if [ $EXIT_CODE = 0 ]; then if [ $EXIT_CODE = 0 ]; then
echo "Config file is a valid yaml" echo "Config file is a valid yaml"
else else

View File

@@ -30,7 +30,7 @@ fi
# Check if yaml is valid # Check if yaml is valid
EXIT_CODE=0 EXIT_CODE=0
yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$?
if [ $EXIT_CODE = 0 ]; then if [ $EXIT_CODE = 0 ]; then
echo "Config file is a valid yaml" echo "Config file is a valid yaml"
else else
@@ -86,7 +86,7 @@ while IFS= read -r line; do
sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || true sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || true
sed -i "1a export $line" /scripts/*run* 2>/dev/null || true sed -i "1a export $line" /scripts/*run* 2>/dev/null || true
# Show in log # Show in log
if ! bashio::config.false "verbose";then bashio::log.blue "$line"; fi if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
else else
bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file." bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file."
fi fi

View File

@@ -30,7 +30,7 @@ fi
# Check if yaml is valid # Check if yaml is valid
EXIT_CODE=0 EXIT_CODE=0
yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$?
if [ $EXIT_CODE = 0 ]; then if [ $EXIT_CODE = 0 ]; then
echo "Config file is a valid yaml" echo "Config file is a valid yaml"
else else
@@ -86,7 +86,7 @@ while IFS= read -r line; do
sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || true sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || true
sed -i "1a export $line" /scripts/*run* 2>/dev/null || true sed -i "1a export $line" /scripts/*run* 2>/dev/null || true
# Show in log # Show in log
if ! bashio::config.false "verbose";then bashio::log.blue "$line"; fi if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
else else
bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file." bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file."
fi fi

View File

@@ -30,7 +30,7 @@ fi
# Check if yaml is valid # Check if yaml is valid
EXIT_CODE=0 EXIT_CODE=0
yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$?
if [ $EXIT_CODE = 0 ]; then if [ $EXIT_CODE = 0 ]; then
echo "Config file is a valid yaml" echo "Config file is a valid yaml"
else else

View File

@@ -30,7 +30,7 @@ fi
# Check if yaml is valid # Check if yaml is valid
EXIT_CODE=0 EXIT_CODE=0
yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$?
if [ $EXIT_CODE = 0 ]; then if [ $EXIT_CODE = 0 ]; then
echo "Config file is a valid yaml" echo "Config file is a valid yaml"
else else

View File

@@ -30,7 +30,7 @@ fi
# Check if yaml is valid # Check if yaml is valid
EXIT_CODE=0 EXIT_CODE=0
yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$?
if [ $EXIT_CODE = 0 ]; then if [ $EXIT_CODE = 0 ]; then
echo "Config file is a valid yaml" echo "Config file is a valid yaml"
else else

View File

@@ -30,7 +30,7 @@ fi
# Check if yaml is valid # Check if yaml is valid
EXIT_CODE=0 EXIT_CODE=0
yamllint -d relaxed --no-warnings $CONFIGSOURCE &>ERROR || EXIT_CODE=$? yamllint -d relaxed $CONFIGSOURCE &>ERROR || EXIT_CODE=$?
if [ $EXIT_CODE = 0 ]; then if [ $EXIT_CODE = 0 ]; then
echo "Config file is a valid yaml" echo "Config file is a valid yaml"
else else