Skip to content

Non local for variable #568

@jpic

Description

@jpic

Should shellcheck prevent leaking of for loop context variables in functions ? Ie. enforce

    foo() {
        local i  # fail if this line is missing
        for i in 0 1 2

Thanks for sharing shellcheck, keep up the great work !!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions