/linter

Lint all-the-things!

Primary LanguageDockerfile

linter

An unopinionated1, lightweight2 Docker image to lint all-the-things3!

All-the-things meme

  1. No specific style enforced, this can be configured in your project.
  2. Well, ~145 MB, because some linters need node.js, which is ~100 MB.
  3. That is,
    • things common to most software projects -- shell scripts, Dockerfiles, Makefiles, *.md files, etc.
    • things not language-specific -- this is better done in either a language-specific linter image, or directly in your project's build image, which typically already has the targeted language's toolchain.

Supported linters

Language Linter
Dockerfile hadolint
English misspell
Makefile checkmake
Markdown markdownlint
Shell shellcheck, shfmt, +x bit check

Usage

Lint all-the-things

The following command will lint all files in the mounted directory using bin/lint:

docker run -v $(pwd):/mnt/lint marccarre/linter:latest

Lint just one thing

You can also directly run a specific sub-linter:

docker run -v $(pwd):/mnt/lint marccarre/linter:latest hadolint Dockerfile

Inspirations