shellcheck icon indicating copy to clipboard operation
shellcheck copied to clipboard

SC1090: allow define alternative source functions

Open robstoll opened this issue 11 months ago • 0 comments

Similar to #2038 but simpler. Consider the following:

#!/usr/bin/env bash
function sourceOrDie() {
  source "$@" || exit 1
}
# shellcheck will not follow the sourced file
sourceOrDie "foo.sh"

I.e. I only need a way to tell shellcheck aliases of source (although they have some additional behaviour but for the analysis this doesn't matter).

robstoll avatar Jan 16 '25 20:01 robstoll