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
feat: support leading dynamic section when sourcing
This does the same thing that ShellCheck does ([here](https://github.com/koalaman/shellcheck/blob/ba86c6363c30a5dbefd0b8b9a7c5f4ab0478dc91/src/ShellCheck/Parser.hs#L2277-L2283)).
`To support the common pattern of . "$CONFIGDIR/mylib.sh", ShellCheck strips one leading, dynamic section before trying to locate the rest.`
fixes#926, fixes#659
fix: handle leading dynamic source paths when concatenating
This fixes `${var}/path` and `"${var}"/path` as well as countless variations of these patterns
Note: this turned out to be rather complex task, so it's broken out into a seperate function, which allows for early returns
refactor: move resolveStaticString to util/tree-sitter.ts
This seemed the most appropriate place for it.
tests: fix existing snapshot and add test for dynamic source paths
Adds a simple test for dynamic source paths and updates the snapshot to match new tests / behaivor.
Note: all the line numbers in the snapshot increased by 2 because I added two new lines (the test and a blank one)
tests: add new test in fixtures/sourcing.sh
I added this to the bottom of the file to minimize snapshot diffs. they're large enough as it is.
0 commit comments