shellcheck
shellcheck copied to clipboard
SC1090: - cannot determine that the path check occurs in the code itself
For bugs
- Rule Id: SC1090
- My shellcheck version: 0.7.0 and online
- [ Yes ] The rule's wiki page does not already cover this (e.g. https://shellcheck.net/wiki/SC2086)
- [ Yes ] I tried on https://www.shellcheck.net/ and verified that this is still a problem on the latest commit
For new checks and feature suggestions
- [ ] https://www.shellcheck.net/ (i.e. the latest commit) currently gives no useful warnings about this
- [ ] I searched through https://github.com/koalaman/shellcheck/issues and didn't find anything related
Here's a snippet or screenshot that shows the problem:
#!/bin/bash
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
Here's what shellcheck currently says:
■ SC1090: Can't follow non-constant source. Use a directive to specify location.
Here's what I wanted or expected to see:
Nothing, logic of this sctipt is derermine, that in this path all is correct
Also it must correctly check this:
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
This code also will determine, that this nonstatic path is correct