diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index c35e6d8280..06d353a795 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -74,6 +74,6 @@ jobs: - name: Shell check mycroft tools uses: ludeeus/action-shellcheck@ceeca77f6538b97991ca2c2a2ebe1ab64e573b5e env: - SHELLCHECK_OPTS: -x --exclude SC2034 --exclude SC2012 --exclude SC1091 + SHELLCHECK_OPTS: -x --exclude SC1091 with: scandir: ./bin diff --git a/bin/mycroft-config b/bin/mycroft-config index 57f81db5cc..d2743c2317 100755 --- a/bin/mycroft-config +++ b/bin/mycroft-config @@ -65,11 +65,17 @@ function found_exe() { } if found_exe tput ; then + # shellcheck disable=SC2034 GREEN="$(tput setaf 2)" + # shellcheck disable=SC2034 BLUE="$(tput setaf 4)" + # shellcheck disable=SC2034 CYAN="$(tput setaf 6)" + # shellcheck disable=SC2034 YELLOW="$(tput setaf 3)" + # shellcheck disable=SC2034 RESET="$(tput sgr0)" + # shellcheck disable=SC2034 HIGHLIGHT=${YELLOW} fi diff --git a/bin/mycroft-help b/bin/mycroft-help index 4dba2452df..dc1716be6f 100755 --- a/bin/mycroft-help +++ b/bin/mycroft-help @@ -18,7 +18,7 @@ SOURCE="${BASH_SOURCE[0]}" cd -P "$( dirname "$SOURCE" )"/.. || exit DIR="$( pwd )" -echo -e "\e[36mMycroft\e[0m is your open source voice assistant. Full source" +echo -e "\\e[36mMycroft\\e[0m is your open source voice assistant. Full source" echo "can be found at: ${DIR}" echo echo "Mycroft-specific commands you can use from the Linux command prompt:" diff --git a/bin/mycroft-say-to b/bin/mycroft-say-to index 0d86d3a13f..f5abbfe21a 100755 --- a/bin/mycroft-say-to +++ b/bin/mycroft-say-to @@ -26,4 +26,4 @@ set -- "${1:-$(> /dev/null diff --git a/bin/mycroft-skill-testrunner b/bin/mycroft-skill-testrunner index 3fc5f37aee..1e4a0f6008 100755 --- a/bin/mycroft-skill-testrunner +++ b/bin/mycroft-skill-testrunner @@ -20,9 +20,14 @@ DIR="$( dirname "$SOURCE" )" # Enter the Mycroft venv source "$DIR/../venv-activate.sh" -q +function count-files() { + # shellcheck disable=SC2012 + ls "$1" | wc -l +} + function vktest-clear() { FEATURES_DIR="$DIR/../test/integrationtests/voight_kampff/features" - num_feature_files=$(ls "$FEATURES_DIR" | wc -l) + num_feature_files=$(count-files "$FEATURES_DIR") # A clean directory will have `steps/` and `environment.py` if [ "$num_feature_files" -gt "2" ] ; then echo "Removing Feature files..." @@ -30,7 +35,7 @@ function vktest-clear() { rm "${DIR}"/../test/integrationtests/voight_kampff/features/*.config.json fi STEPS_DIR="$FEATURES_DIR/steps" - num_steps_files=$(ls "$STEPS_DIR" | wc -l) + num_steps_files=$(count-files "$STEPS_DIR") if [ "$num_steps_files" -gt "2" ] ; then echo "Removing Custom Step files..." TMP_DIR="$STEPS_DIR/tmp" diff --git a/bin/mycroft-speak b/bin/mycroft-speak index 625b002c98..a4eb4d5331 100755 --- a/bin/mycroft-speak +++ b/bin/mycroft-speak @@ -24,4 +24,4 @@ source "$DIR/../venv-activate.sh" -q # Send a message to be spoken data="$*" -output=$(python -m mycroft.messagebus.send "speak" "{\"utterance\": \"$data\"}") +python -m mycroft.messagebus.send "speak" "{\"utterance\": \"$data\"}" >> /dev/null