You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried on shellcheck.net and verified that this is still a problem on the latest commit
Here's a snippet or screenshot that shows the problem:
I've set the flags
-P /home/username/ -P /
#!/bin/bashsource~/.bashrc
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:
I wanted shellcheck to find .bashrc in /home/username/.bashrc and not show a warning.
If I insert
# shellcheck source=/home/username/.bashrc
above this line, shellcheck finds the file and doesn't show a warning (but if I misspell the file name then shellcheck still warns), so my overall usage of shellcheck isn't borked.
Is there any way I can use source paths or some other feature to tell shellcheck where my home will be without having to specify a directive each time?
The text was updated successfully, but these errors were encountered:
I would appreciate this as well. There are often times where I need to source a file in the user's home directory, e.g. ~/.config/foo, and I end up needing to hard-code my own home directory path to satisfy shellcheck. I feel this looks sloppy when shared with others (see my neuron-autoindex script for an example).
For bugs
shellcheck --version
or "online"): 0.7.0Here's a snippet or screenshot that shows the problem:
I've set the flags
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:
I wanted shellcheck to find .bashrc in /home/username/.bashrc and not show a warning.
If I insert
# shellcheck source=/home/username/.bashrc
above this line, shellcheck finds the file and doesn't show a warning (but if I misspell the file name then shellcheck still warns), so my overall usage of shellcheck isn't borked.
Is there any way I can use source paths or some other feature to tell shellcheck where my home will be without having to specify a directive each time?
The text was updated successfully, but these errors were encountered: