apeitheo / aletheia

Command-line media player with speed controls and voice feedback
GNU General Public License v3.0
3 stars 1 forks source link

A few nits running shellcheck on aletheia #10

Closed DidierSpaier closed 5 months ago

DidierSpaier commented 8 months ago
didier[aletheia]$ shellcheck aletheia

In aletheia line 47:
    space="$(printf '%*s' ${#PROGRAM_NAME})"
                        ^---^ SC2183: This format string has 2 variables, but is passed 1 arguments.

In aletheia line 2449:
                START_MARKER="$(printf "%.2f" $(tail -1 "$ALETHEIA/mplayer_output" | cut -d'=' -f2))"
                                                              ^-- SC2046: Quote this to prevent word splitting.

In aletheia line 2459:
                END_MARKER="$(printf "%.2f" $(tail -1 "$ALETHEIA/mplayer_output" | cut -d'=' -f2))"
                                                            ^-- SC2046: Quote this to prevent word splitting.

In aletheia line 3632:
            select_color true $1
                                          ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
            select_color true "$1"

In aletheia line 7420:
        if [ -n "$z" ]; then continue; fi
                                     ^------^ SC2104: In functions, use return instead of continue.

In aletheia line 7424:
            if [ -n "$z" ]; then continue; fi
                                             ^------^ SC2104: In functions, use return instead of continue.

In aletheia line 9924:
                    printf '%*s' $percent | tr " " "="
                                               ^---^ SC2183: This format string has 2 variables, but is passed 1 arguments.

For more information:
  https://www.shellcheck.net/wiki/SC2104 -- In functions, use return instead ...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2183 -- This format string has 2 variable...

Very few issues for so huge a script :)

apeitheo commented 6 months ago

I apologize for the delay. Recently, my health hasn't been great, limiting my ability to work on the project. Besides the ShellCheck issues you've highlighted, I have a few more changes waiting to be submitted to GitHub. Rest assured, I will address these and other pending matters in the coming days.

Thank you for bringing this to my attention.

Best regards, Brad

DidierSpaier commented 6 months ago

No problem, Brad.

Take care of your health first.

Cheers, Didier

apeitheo commented 5 months ago

Everything passes shellcheck now. Lots of new changes as well, so let me know if you run into any other issues.

Thanks again, Brad

DidierSpaier commented 5 months ago

Indeed shellcheck is happy now, thanks!

I will package the new version for Slint in the coming days, test and let you know my findings.

Greetings, Didier