Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some errors #4

Open
Haroenv opened this issue May 25, 2016 · 0 comments
Open

Fix some errors #4

Haroenv opened this issue May 25, 2016 · 0 comments

Comments

@Haroenv
Copy link
Member

Haroenv commented May 25, 2016

$ shellcheck myscript

Line 11:
while [[ true ]]; do
         ^-- SC2160: Instead of '[ true ]', just use 'true'.

Line 15:
        read inputmethod
        ^-- SC2162: read without -r will mangle backslashes.

Line 16:
        if [[ $inputmethod == "/001" || $inpumethod == "ITEM001" ]]; then
                                        ^-- SC2154: inpumethod is referenced but not assigned (did you mean 'inputmethod'?).

Line 21:
                        read $2
                        ^-- SC2162: read without -r will mangle backslashes.
                             ^-- SC2086: Double quote to prevent globbing and word splitting.

Line 30:
                        read -s myresult
                        ^-- SC2162: read without -r will mangle backslashes.

Line 31:
                        myresult=$(sed 's/\//ITEM/;s/-/POS/;s/*/OPS/;s/+/HELP/' <<< $myresult)
                                                                                    ^-- SC2086: Double quote to prevent globbing and word splitting.

Line 32:
                        echo $myresult
                             ^-- SC2086: Double quote to prevent globbing and word splitting.

Line 33:
                        eval $__resultvar="'$myresult'"
                             ^-- SC2086: Double quote to prevent globbing and word splitting.

Line 40:
while [[ true ]]; do
         ^-- SC2160: Instead of '[ true ]', just use 'true'.

Line 43:
        case $lang in
             ^-- SC2154: lang is referenced but not assigned.

Line 105:
                case $position in
                     ^-- SC2154: position is referenced but not assigned.

Line 148:
                printf "\r%02d" $seconds
                                ^-- SC2086: Double quote to prevent globbing and word splitting.

Line 149:
                seconds=$(($seconds - 1))
                           ^-- SC2004: $/${} is unnecessary on arithmetic variables.

Line 157:
        case $operation in
             ^-- SC2154: operation is referenced but not assigned.

Line 168:
                                case $item in
                                     ^-- SC2154: item is referenced but not assigned.

Line 624:
                                                        dist=$(($dist - 80))
                                                                ^-- SC2004: $/${} is unnecessary on arithmetic variables.

Line 742:
                                min=$(($min+1))
                                       ^-- SC2004: $/${} is unnecessary on arithmetic variables.

Line 743:
                                max=$(($max-1))
                                       ^-- SC2004: $/${} is unnecessary on arithmetic variables.

Line 864:
while [[ true ]]; do
         ^-- SC2160: Instead of '[ true ]', just use 'true'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant