Sign inSign up

gruen/shellcheck

By gruen

•Updated over 9 years ago

Shellcheck in a docker container

Image
0

2.5K

gruen/shellcheck repository overview

⁠Docker container from ShellCheck

Checkout ShellCheck⁠

⁠Usage

docker run -i --rm \
    -v "$(pwd)":/workdir \
    --name [name] \
    gruen\shellcheck file_to_check [options]

The command above will lint file_to_check within the current directory

⁠Text Editor Linters

You can use a docker container to lint files within editors.

For example, with atom-linter and linter-shellcheck create a file called shellcheck inside your $PATH with the following. (be sure to make the file executable)

#!/usr/bin/env bash

docker run -i --rm \
    -v "$(pwd)":/workdir \
    --name shellcheck"$(date +%H%M%S)" \
    gruen\shellcheck

NOTICE the name parameter, it uses "$(date +%H%M%S)" to append a timestamp. This should avoid conflicts when your editor invokes the linter several times within a very short period

Tag summary

Content type

Image

Digest

Size

50.6 MB

Last updated

over 9 years ago

docker pull gruen/shellcheck