mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC1090 (markdown)
20
SC1090.md
Normal file
20
SC1090.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
## This source will be skipped since it's not constant.
|
||||||
|
|
||||||
|
### Problematic code:
|
||||||
|
|
||||||
|
source "$1/lib.sh"
|
||||||
|
|
||||||
|
### Correct code:
|
||||||
|
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
source "$1/lib.sh"
|
||||||
|
|
||||||
|
### Rationale:
|
||||||
|
|
||||||
|
ShellCheck is not able to include sourced files from non-constant paths.
|
||||||
|
|
||||||
|
Instead, be aware that anything in the sourced file will be ignored, and then disable the message.
|
||||||
|
|
||||||
|
### Exceptions:
|
||||||
|
|
||||||
|
Ignore the message with a [[directive]].
|
Reference in New Issue
Block a user