Skip to content

SC2148 cannot be disabled #215

@arth1

Description

@arth1
$ echo -e "# shellcheck disable=SC2148\n:" >test
$ shellcheck test

In test line 1:
# shellcheck disable=SC2148
^-- SC2148: Include a shebang (#!) to specify the shell.

It's even colored red as an error, not a warning. No, I don't want a shebang - some scripts are only meant to be sourced, and should not be executed on their own. In fact, it would be nice if disable=SC2148 could be placed anywhere in the file, so the first line can be reserved for comments.

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