A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vscode-shellcheck/vscode-shellcheck/issues/24 below:

Support Docker version of Shellcheck · Issue #24 · vscode-shellcheck/vscode-shellcheck · GitHub

So, I'm a Mac user, specifically a Macports user, not a brew user. So installing the latest shellcheck is difficult right now.

That said, I can use Docker, and there is a Docker container for Shellcheck. So I threw together a shim:

#!/bin/sh
if [[ ! -e "${1}" ]] ; then
  docker run koalaman/shellcheck:stable "${1}"
  exit $?
fi

filepath=$(dirname "${1}")
filepath=${filepath:+$(pwd)} # Use current working directory if no path in argument

filename=$(basename "${1}")
docker run --mount type=bind,source="${filepath}",target=/mnt koalaman/shellcheck:stable /mnt/${filename}

This functions absolutely fine for me on the command line, but it doesn't seem to function with the Visual Studio Code extension.

It would be super helpful if vscode-shellcheck were able to grab the latest shellcheck docker image and use that instead.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4