Skip to content

cmd/shfmt: add ability to skip unknown (non-shell) files #477

@tbcs

Description

@tbcs

If scripts in a git repository don't have a .sh extension and are spread across various directories it's cumbersome to use shfmt in a pre-commit hook. It would be useful if shfmt could skip non-shell files when invoked from a git hook with the list of files being changed (as it is the case with pre-commit).

This is similar to #288, but different, because the desired behavior here would be that not explicit configuration is required. Rather, shfmt should "magically" skip non-shell files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions