stackabletech / stackabletech/stackable-utils
Implemente SC2044: don't use fragile loops with find
Open
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
ShellCheck flags two loops in the release script that loop over find output. This is fragile for files containing spaces.
Reference: https://www.shellcheck.net/wiki/SC2044
(stackable) ➜ stackable-utils git:(main) shellcheck release/create-release-tag.sh
In release/create-release-tag.sh line 142:
for file in $(find "$1/docs/modules/getting_started/examples/code" -name "*.yaml"); do
^-- SC2044 (warning): For loops over find output are fragile. Use find -exec or a while read loop.
In release/create-release-tag.sh line 160:
for file in $(find "$1/docs" -name "*.adoc"); do
^-- SC2044 (warning): For loops over find output are fragile. Use find -exec or a while read loop.
For more information:
https://www.shellcheck.net/wiki/SC2044 -- For loops over find output are fr...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open release/create-release-tag.sh and inspect the loops at lines 142 and 160. Read the SC2044 reference, then run ShellCheck on the script; done means both warnings are resolved without breaking handling of paths containing spaces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- release
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100