Build a Python CI/CD System; Code quality with pylint
This post is part of a series of posts where we will build a full Python CI/CD system capable of running tests against multiple projects. In each post we will put a spotlight on a particular concept.
Code quality is one of the more important things to bring to a software team to ensure a good maintainability of the solutions the team works on. The tech industry has a high attrition rate in comparison to other industries and ensuring a standard of quality from the code on an ongoing basis can help with managing the time-to-productivity for new devs and the overall tech debt.
Will code quality scans prevent issues altogether? No but in the words of Tesco; “Every little helps”.
Intro to pylint
Rather than try to explain myself what pylint is, here it is right from the horses mouth:
Pylint is a Python static code analysis tool which looks for programming errors, helps enforcing a coding standard, sniffs for code smells and offers simple refactoring suggestions.
Pylint is the tool of choice for scanning python based projects and helping to identify the aforementioned code smells and potential improvements. One of its potentially unknown features is that you can design your own plugins for pylint which can help your team enforce certain team-specific stylistic requirements. For example, maybe your team requires a certain pylint check to verify your source code includes a copyright or…