DEV Community

Aubrey Portwood
Aubrey Portwood

Posted on • Edited on

3

Need to use shellcheck with .zsh and or #!/bin/zsh scripts? [SC1071]

If, like me, you find yourself trying to use shellcheck to lint .zsh files with #!/bin/zsh but it keeps telling you:

A screenshot of the error below.



shellcheck: error
error - ShellCheck only supports sh/bash/dash/ksh scripts. 
Sorry! [SC1071]


Enter fullscreen mode Exit fullscreen mode

What I was able to do is pass the --shell=bash argument to shellcheck and then it would lint my files.

In my case this was configured in my SublimeLinter config, like so:



{
    "linters": {
        "shellcheck": {
            "args": [
                "--shell=bash"
            ]
        },
    }
}


Enter fullscreen mode Exit fullscreen mode

...just in case you are using Sublime Text!

Top comments (1)

Collapse
 
shchvova profile image
Svoka • Edited

For VSCode shellcheck extension do

{
    "shellcheck.customArgs": ["--shell=bash"]
}
Enter fullscreen mode Exit fullscreen mode

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more