Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alvarofpp/docker-linter
A docker image to ensure the code quality of my projects.
https://github.com/alvarofpp/docker-linter
docker docker-image linter
Last synced: 2 days ago
JSON representation
A docker image to ensure the code quality of my projects.
- Host: GitHub
- URL: https://github.com/alvarofpp/docker-linter
- Owner: alvarofpp
- License: bsd-3-clause
- Created: 2024-02-06T01:22:42.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-08-09T21:21:10.000Z (3 months ago)
- Last Synced: 2024-08-09T22:32:19.552Z (3 months ago)
- Topics: docker, docker-image, linter
- Language: Shell
- Homepage: https://hub.docker.com/r/alvarofpp/linter
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker image with linters
[![Docker Hub](https://img.shields.io/badge/-Docker_Hub-0062cc?style=for-the-badge&logo=Docker&logoColor=white)][docker-hub]
In this Docker image, you will find some linters for your projects.
```shell
docker pull alvarofpp/linter:latest
```Linters in this image and which command to invoke it:
| Linter | Command | Config file |
|---------------------------------|----------------------------------|-------------------|
| [Commit (git)][linter-commit] | `lint-commit ` | `.commitlintrc` |
| [Dockerfile][linter-dockerfile] | `lint-dockerfile` | `.hadolint.yaml` |
| [Markdown][linter-markdown] | `lint-markdown` | `.markdownlintrc` |
| [Python][linter-python] | `lint-python`, `lint-python-fix` | `.ruff.toml` |
| [Shell script][linter-shell] | `lint-shell-script` | `.shellcheckrc` |
| [YAML][linter-yaml] | `lint-yaml` | `.yamllint` |You can create a `.lint/` directory with your linters configs,
exceptionally the `.shellcheckrc` file must be in the main directory.## How to use
```shell
docker run --rm -v $(pwd):/app alvarofpp/linter " \
lint-commit origin/main \
&& lint-markdown \
&& lint-shell-script \
&& lint-yaml"
```## Manual test
Build the image:
```shell
docker build -t alvarofpp/linter .
```Run the command below to start using an image container for testing:
```shell
docker run -it --rm -v $(pwd):/app alvarofpp/linter /bin/bash
```[docker-hub]: https://hub.docker.com/r/alvarofpp/linter
[linter-commit]: https://github.com/conventional-changelog/commitlint
[linter-dockerfile]: https://github.com/hadolint/hadolint
[linter-markdown]: https://github.com/igorshubovych/markdownlint-cli
[linter-python]: https://github.com/astral-sh/ruff
[linter-shell]: https://github.com/koalaman/shellcheck
[linter-yaml]: https://github.com/adrienverge/yamllint