Writing pylint plugins
a workshop with Alexander Todorov

Pylint is the most popular Python source code analyzer which looks for programming errors, helps enforce a coding standard and sniffs for some code smells. It is possible to write plugins to add your own checks, for example, coding patterns that you have observed inside your software and are generally a bad practice or rules which you would like to enforce inside of a particular project, e.g. class name and inheritance conventions.

This workshop will focus on understanding how the pylint plugin works, how to examine AST tree of a piece of code and create a minimalistic plugin from scratch.

Requirements:

  • Python 3.6 installed and running
  • pylint >= 1.8 installed inside virtualenv
  • Try to identify several patterns observed in a project you worked on, which are not detected by standard pylint checks so that you can write a plugin for them. An instructor will provide some patterns for you if you don't have such.

Slides.

This workshop is suitable for both beginner and advanced Pythonistas.

Alexander Todorov

I am a Senior QA engineer with lots of experience in test automation with Python. I am the project lead for Kiwi TCMS, maintainer of pylint-django and contributor to pylint among other projects.