In this Docker image, you will find some linters for your projects.
docker pull alvarofpp/linter:latest
Linters in this image and which command to invoke it:
Linter | Command | Config file |
---|---|---|
Commit (git) | lint-commit <target_branch> |
.commitlintrc |
Dockerfile | lint-dockerfile |
.hadolint.yaml |
Markdown | lint-markdown |
.markdownlintrc |
Python | lint-python |
.ruff.toml |
Shell script | lint-shell-script |
.shellcheckrc |
YAML | lint-yaml |
.yamllint |
You can create a .lint/
directory with your linters configs,
exceptionally the .shellcheckrc
file must be in the main directory.
docker run --rm -v $(pwd):/app alvarofpp/linter " \
lint-commit origin/main \
&& lint-markdown \
&& lint-shell-script \
&& lint-yaml"
Build the image:
docker build -t alvarofpp/linter .
Run the command below to start using an image container for testing:
docker run -it --rm -v $(pwd):/app alvarofpp/linter /bin/bash