Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemente SC2044: don't use fragile loops with find #37

Open
fhennig opened this issue Jan 26, 2023 · 0 comments
Open

Implemente SC2044: don't use fragile loops with find #37

fhennig opened this issue Jan 26, 2023 · 0 comments

Comments

@fhennig
Copy link
Contributor

fhennig commented Jan 26, 2023

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...
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

No branches or pull requests

1 participant