Skip to content

Linedwell/docker-pylint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 Name Dockerfile Compressed Size
py2 py2/Dockerfile Size: 27 MB
py3 py3/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 $?

About

Containers for linting python files in CI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published