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

Solve warnings from Shellcheck #12

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

asensi
Copy link
Contributor

@asensi asensi commented Jan 27, 2025

Solve warnings from the static analyzer named Shellcheck:

  • Two variables that are unused:

    • in the line USER_FILTER="-u $user_id". In this case, it seems that USER_FILTER must be used in the place it was used before.
    • in the line CURRENT_SCRIPT_NAME=$(basename "$0"). In this case, it seems that this line has to be deleted.
  • Two "Consider invoking this command separately to avoid masking its return" (https://www.shellcheck.net/wiki/SC2312).

  • Several "Prefer [[ ]] over [ ] for tests in Bash/Ksh" (https://www.shellcheck.net/wiki/SC2292).

Solve warnings from the static analyzer named Shellcheck:

- Two variables that are unused:
    - In the line `USER_FILTER="-u $user_id"`. In this case, it seems that `USER_FILTER` must be used in the place it was used before.
    - In the line `CURRENT_SCRIPT_NAME=$(basename "$0")`. In this case, it seems that this line has to be deleted.

- Two "Consider invoking this command separately to avoid masking its return" (https://www.shellcheck.net/wiki/SC2312).
    
- Several "Prefer [[ ]] over [ ] for tests in Bash/Ksh" (https://www.shellcheck.net/wiki/SC2292).
@academo
Copy link
Owner

academo commented Jan 28, 2025

Thanks for the fixes!

@academo academo merged commit 626e714 into academo:master Jan 28, 2025
@asensi asensi deleted the solve_warnings_from_Shellcheck branch January 29, 2025 19:45
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

Successfully merging this pull request may close these issues.

2 participants