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 shellcheck errors and warnings #1

Closed
oxr463 opened this issue Nov 11, 2019 · 1 comment
Closed

Fix shellcheck errors and warnings #1

oxr463 opened this issue Nov 11, 2019 · 1 comment

Comments

@oxr463
Copy link

oxr463 commented Nov 11, 2019

shellcheck genfstab
 
Line 51:
out() { printf "$1 $2\n" "${@:3}"; }
               ^-- SC2059: Don't use variables in the printf format string. Use printf '..%s..' "$foo".
 
Line 72:
  local i= chr= out=
         ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ).
              ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ).
 
Line 90:
  local i= chr= out= len=$(( ${#1} - 4 ))
         ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ).
              ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ).
                   ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ).
 
Line 164:
  local options_=$1
        ^-- SC2178: Variable was used as an array but is now assigned a string.
 
Line 194:
  read dm_name <"/sys/class/block/${1#/dev/}/dm/name"
  ^-- SC2162: read without -r will mangle backslashes.
 
Line 215:
  local src=$1 spec= label= uuid= comment=()
                   ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ).
                          ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ).
                                ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ).
 
Line 243:
  [[ $comment ]] && printf '# %s\n' "${comment[*]}"
     ^-- SC2128: Expanding an array without an index only gives the first element.
 
Line 276:
      if optstring_get_option "$varname" codepage && [[ $codepage = cp* ]]; then
                                                        ^-- SC2154: codepage is referenced but not assigned.
 
Line 417:
  read
  ^-- SC2162: read without -r will mangle backslashes.
@glacion
Copy link
Owner

glacion commented Mar 3, 2022

Report to upstream at https://github.com/archlinux/arch-install-scripts

@glacion glacion closed this as completed Mar 3, 2022
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

2 participants