Sign inSign up

linedwell/pylint

By linedwell

•Updated almost 3 years ago

Containers for linting python files in CI pipelines

Image
1

8.9K

linedwell/pylint repository overview

Build Status

⁠docker-pylint

Minimal docker images for linting Python files in CI based on Alpine Linux.

This container can be pulled with:

docker pull linedwell/pylint

⁠Tags

Tag NameDockerfileCompressed Size
py2py2/Dockerfile⁠Size: 27 MB
py3py3/Dockerfile⁠Size: 39 MB

⁠Content

This container is designed for running python lint checks on GitLab CI and similars. The following packages are installed:

  • python 2.7.17 (for py2) or python 3.8.1 (for py3)
  • pylint
  • pylint-exit

⁠Usage

⁠Python Linting

docker run --rm -v $(pwd):/code -w "/code" linedwell/pylint:py2 \
  pylint  --output-format=colorized --reports=y \
  path/to/python/files

As pylint uses exit code to report analysis results (such as refactoring advices) you can first redirect your pylint exit to pylint-exit in order to have 0 as exit code if no fatal error has been found:

docker run --rm -v $(pwd):/code -w "/code" linedwell/pylint:py2 \
  pylint  --output-format=colorized --reports=y \
  path/to/python/files || pylint-exit $?

Tag summary

Content type

Image

Digest

sha256:5e5d85ccd…

Size

197.4 MB

Last updated

almost 3 years ago

docker pull linedwell/pylint