Skip to content

Commit

Permalink
test(shellcheck): migrate disabled rules to a new .shellcheckrc
Browse files Browse the repository at this point in the history
  • Loading branch information
travi committed Feb 28, 2025
1 parent ca07056 commit 6e6dc78
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 26 deletions.
2 changes: 2 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
disable=SC1091
disable=SC1090
1 change: 0 additions & 1 deletion bash/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ alias ccat="source-highlight --out-format=esc -o STDOUT -i"

alias vim-plugins="vim +PluginInstall! +qall"

#shellcheck disable=SC1090
. "$HOME/.files/osx/aliases.sh"
4 changes: 0 additions & 4 deletions bash/completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ fi

# completion of docker commands
if command -v docker > /dev/null 2>&1; then
#shellcheck disable=SC1090
. ~/.files/docker/bash_completion.sh
fi

Expand All @@ -18,15 +17,12 @@ fi

#completion of rake commands
if command -v rake > /dev/null 2>&1; then
#shellcheck disable=SC1090
. ~/.files/ruby/rake-completion.sh
fi

#completion of npm commands
if command -v npm > /dev/null 2>&1; then
#shellcheck disable=SC1090
source <(npm completion)
fi

#shellcheck disable=SC1090
. ~/.files/osx/completion.sh
10 changes: 0 additions & 10 deletions bash/source.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
#!/bin/sh

#shellcheck disable=SC1090
. ~/.files/bash/exports.sh

#shellcheck disable=SC1090
. ~/.files/bash/colors.sh
#shellcheck disable=SC1090
. ~/.files/bash/completion.sh

#shellcheck disable=SC1090
. ~/.files/bash/aliases.sh
#shellcheck disable=SC1090
. ~/.files/bash/functions.sh

#shellcheck disable=SC1090
. ~/.files/git/functions.sh
#shellcheck disable=SC1090
. ~/.files/ruby/rbenv-init.sh

#shellcheck disable=SC1090
. ~/.files/bash/prompt.sh

#shellcheck disable=SC1090
. ~/.files/osx/source.sh
#shellcheck disable=SC1090
. ~/.files/windows/source.sh
2 changes: 0 additions & 2 deletions gpg/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.

if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
#shellcheck disable=SC1090
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
#shellcheck disable=SC1090
eval $(gpg-agent --daemon ~/.gnupg/.gpg-agent-info)
fi
1 change: 0 additions & 1 deletion osx/source.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
#shellcheck disable=SC1090

# OSX-only stuff. Abort if not OSX.
[[ "$OSTYPE" == darwin* ]] || return 1
Expand Down
1 change: 0 additions & 1 deletion setup/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ heading 'Link Dotfiles'
link_dotfiles
link_gitconfig_for_os

#shellcheck disable=SC1090
source "$HOME/.bash_profile" && bind -f "$HOME/.inputrc"

if [ ! -d ~/bin ]; then
Expand Down
1 change: 0 additions & 1 deletion setup/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
DOTFILES_ROOT="$(pwd)/.."
DOTFILES_LINK="$HOME/.files"

#shellcheck disable=SC1090
. "$DOTFILES_ROOT/bash/colors.sh"

heading() {
Expand Down
4 changes: 2 additions & 2 deletions test/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
set -euo pipefail
IFS=$'\n\t'

shellcheck --exclude=SC1091,SC1090 bash/*.sh
shellcheck bash/*.sh
shellcheck osx/*.sh
shellcheck ruby/*.sh
shellcheck --exclude=SC1091 setup/*.sh
shellcheck setup/*.sh
shellcheck test/*.sh
shellcheck tmux/*.sh
shellcheck windows/*.sh
Expand Down
1 change: 0 additions & 1 deletion windows/software.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash

#shellcheck disable=SC1090
. ~/.files/setup/functions.sh

# Windows-only stuff. Abort if not Windows.
Expand Down
1 change: 0 additions & 1 deletion windows/source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
# Windows-only stuff. Abort if not Windows.
[[ -n "$WINDIR" ]] || return 0

#shellcheck disable=SC1090
. ~/.files/windows/ssh-agent.sh
2 changes: 0 additions & 2 deletions windows/ssh-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ agent_has_keys() {
}

agent_load_env() {
#shellcheck disable=SC1090
. "$env" >/dev/null
}

agent_start() {
(umask 077; ssh-agent >"$env")
#shellcheck disable=SC1090
. "$env" >/dev/null
}

Expand Down

0 comments on commit 6e6dc78

Please sign in to comment.