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

Shellcheck #27

Open
16 tasks
pyllyukko opened this issue Nov 8, 2017 · 1 comment
Open
16 tasks

Shellcheck #27

pyllyukko opened this issue Nov 8, 2017 · 1 comment

Comments

@pyllyukko
Copy link
Owner

pyllyukko commented Nov 8, 2017

  • SC1090: Can't follow non-constant source. Use a directive to specify location.
  • SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop.
  • SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
  • SC2044: For loops over find output are fragile. Use find -exec or a while read loop.
  • SC2048: Use "$@" (with quotes) to prevent whitespace problems.
  • SC2174: When used with -p, -m only applies to the deepest directory.
  • SC2162: read without -r will mangle backslashes.
  • SC2197: fgrep is non-standard and deprecated. Use grep -F instead.
  • SC2016: Expressions don't expand in single quotes, use double quotes for that.
  • SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
  • SC2046: Quote this to prevent word splitting.
  • SC2154: ret is referenced but not assigned.
  • SC2155: Declare and assign separately to avoid masking return values.
  • SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
  • SC2034: appears unused. Verify it or export it.
  • SC2128: Expanding an array without an index only gives the first element.
@pyllyukko
Copy link
Owner Author

6703751

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant