Skip to content

Conversation

@JonTheNiceGuy
Copy link

@JonTheNiceGuy JonTheNiceGuy commented Jan 19, 2021

Shellcheck results SC2046 and SC2086 relate to how variables are handled where they may hold strings with spaces or "glob"ing characters (like * and ?).

In this PR, I wrap all script or function calls which pass variables that are themselves variables ($foo), or commands ($(foo)).

Note that this broke the test for generate-contents-with-prefix, so I resolved that by changing getopt $* to getopts in src/_adr_generate_toc.

This also removes the unnecesary loading of the config file in _adr_dir.

Shellcheck results [SC2046](https://www.shellcheck.net/wiki/SC2046) and
[SC2086](https://www.shellcheck.net/wiki/SC2086) relate to how variables are
handled where they may hold strings with spaces or "glob"ing characters (like
`*` and `?`).

In this PR, I wrap all script or function calls which pass variables that are
themselves variables (`$foo`), or commands (`$(foo)`).

Note that this broke the test for generate-contents-with-prefix, so I resolved
that by changing `getopt $*` to `getopts` in `src/_adr_generate_toc`.
halostatue pushed a commit to halostatue/adr-tools that referenced this pull request Jul 20, 2024
Shellcheck results [SC2046](https://www.shellcheck.net/wiki/SC2046) and
[SC2086](https://www.shellcheck.net/wiki/SC2086) relate to how variables are
handled where they may hold strings with spaces or "glob"ing characters (like
`*` and `?`).

In this PR, I wrap all script or function calls which pass variables that are
themselves variables (`$foo`), or commands (`$(foo)`).

Note that this broke the test for generate-contents-with-prefix, so I resolved
that by changing `getopt $*` to `getopts` in `src/_adr_generate_toc`.

- Removed non-required loading of config in _adr_dir

npryce#104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant