Skip to content

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

@fhennig

Description

@fhennig

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions