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 #32

Closed
ratmav opened this issue Oct 4, 2019 · 2 comments
Closed

shellcheck #32

ratmav opened this issue Oct 4, 2019 · 2 comments

Comments

@ratmav
Copy link
Owner

ratmav commented Oct 4, 2019

[ccuming@ccuming dotfiles]$ shellcheck .bash*

In .bash_profile line 4:
    . ~/.bashrc
      ^-------^ SC1090: Can't follow non-constant source. Use a directive to specify location.


In .bashrc line 10:
    [[ ! $TERM =~ screen ]] && [ -z $TMUX ] && [[ $- == *i* ]] && exec tmux
                                    ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
    [[ ! $TERM =~ screen ]] && [ -z "$TMUX" ] && [[ $- == *i* ]] && exec tmux


In .bashrc line 20:
    source "$(brew --prefix)/etc/bash_completion"
           ^-- SC1090: Can't follow non-constant source. Use a directive to specify location.


In .bashrc line 35:
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
                               ^---------------^ SC1090: Can't follow non-constant source. Use a directive to specify location.


In .bashrc line 36:
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
                                        ^------------------------^ SC1090: Can't follow non-constant source. Use a directive to specify location.


In .bashrc line 39:
source "$HOME/.gvm/scripts/gvm"
       ^----------------------^ SC1090: Can't follow non-constant source. Use a directive to specify location.


In .bashrc line 43:
    . ~/.misc_envars
      ^------------^ SC1090: Can't follow non-constant source. Use a directive to specify location.

For more information:
  https://www.shellcheck.net/wiki/SC1090 -- Can't follow non-constant source....
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
[ccuming@ccuming dotfiles]$ shellcheck bootstrap.sh

In bootstrap.sh line 3:
source ./bash/mac_os.sh
       ^--------------^ SC1091: Not following: ./bash/mac_os.sh was not specified as input (see shellcheck -x).


In bootstrap.sh line 4:
source ./bash/linux.sh
       ^-------------^ SC1091: Not following: ./bash/linux.sh was not specified as input (see shellcheck -x).


In bootstrap.sh line 21:
  git config --global core.editor "$(which nvim)"
                                     ^---^ SC2230: which is non-standard. Use builtin 'command -v' instead.


In bootstrap.sh line 27:
    rm -rf $HOME/$link
           ^---------^ SC2115: Use "${var:?}" to ensure this never expands to / .
           ^---^ SC2086: Double quote to prevent globbing and word splitting.
                 ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
    rm -rf "$HOME"/"$link"


In bootstrap.sh line 28:
    ln -s $PWD/$link $HOME/$link
          ^--^ SC2086: Double quote to prevent globbing and word splitting.
               ^---^ SC2086: Double quote to prevent globbing and word splitting.
                     ^---^ SC2086: Double quote to prevent globbing and word splitting.
                           ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
    ln -s "$PWD"/"$link" "$HOME"/"$link"


In bootstrap.sh line 42:
  mkdir -p $HOME/.config/nvim
           ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
  mkdir -p "$HOME"/.config/nvim


In bootstrap.sh line 44:
    ln -s $PWD/init.vim $HOME/.config/nvim/init.vim
          ^--^ SC2086: Double quote to prevent globbing and word splitting.
                        ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
    ln -s "$PWD"/init.vim "$HOME"/.config/nvim/init.vim

For more information:
  https://www.shellcheck.net/wiki/SC2115 -- Use "${var:?}" to ensure this nev...
  https://www.shellcheck.net/wiki/SC1091 -- Not following: ./bash/linux.sh wa...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
[ccuming@ccuming dotfiles]$ shellcheck bash/*

In bash/mac_os.sh line 21:
    if brew list | grep $package > /dev/null 2>&1; then
                        ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
    if brew list | grep "$package" > /dev/null 2>&1; then


In bash/mac_os.sh line 24:
      brew install $package
                   ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
      brew install "$package"


In bash/mac_os.sh line 34:
    brew cask reinstall $cask --force 1>/dev/null
                        ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean:
    brew cask reinstall "$cask" --force 1>/dev/null

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
@ratmav
Copy link
Owner Author

ratmav commented Oct 8, 2019

need to re-run this against the vscodium branch, assuming i stick with that.

@ratmav ratmav added the wontfix label Oct 8, 2019
@ratmav
Copy link
Owner Author

ratmav commented Oct 8, 2019

shellcheck doesn't have zsh support, and after #34 popped up, it looks like i'll kind of need it.

@ratmav ratmav closed this as completed Oct 8, 2019
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