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
{{ message }}
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.
I use a shellcheck source directive to give the filename where I have a variable source or . in the shell code.
This along with the -x option to shellcheck should include those files in it's processing.
Ideally I want use a relative path to the file from the project location, but I'm not sure what the current working directory context for shellcheck will be when it is run. I can't make it work with any combination of absolute or relative paths at the moment.
For added complication I am also running on Windows!
I see something like the following regardless of the path to the file I give in the directive:
Info ShellCheck Not following: src/common_functions.sh: openBinaryFile: does not exist (No such file or directory) [SC1091]
The text was updated successfully, but these errors were encountered:
It looks like it was originally set in #40 to the directory of the current file. A better choice (which sounds like it should fit your use case) would be to use the project root path, and fall back to the current directory of the file in question, like this.
Hi there, I wanted to comment here because I am also seeing these inconsistencies in using shellcheck from Atom and on the command line. Because the Atom plugin runs shellcheck relative to the file, I get errors when I run my own shellcheck from the command line or under a CI script when the current directory is the project root.
I use a shellcheck source directive to give the filename where I have a variable source or . in the shell code.
This along with the -x option to shellcheck should include those files in it's processing.
Ideally I want use a relative path to the file from the project location, but I'm not sure what the current working directory context for shellcheck will be when it is run. I can't make it work with any combination of absolute or relative paths at the moment.
For added complication I am also running on Windows!
Any ideas to get things working much appreciated.
The code I'm having issues with looks like this:
I see something like the following regardless of the path to the file I give in the directive:
Info ShellCheck Not following: src/common_functions.sh: openBinaryFile: does not exist (No such file or directory) [SC1091]
The text was updated successfully, but these errors were encountered: