Lint All the Things! by Luke Lee

Описание к видео Lint All the Things! by Luke Lee

Many teams document the conventions for their projects. However, documentation gets out of date, forgotten, or sometimes ignored. Simple documentation requires team members to constantly remember all the ‘rules’ for your project. You can better enforce those rules and free up your team members to think about harder problems using linting tools like flake8, import linter, and pre-commit.


These tools provide tons of useful stuff out of the box, but you can push them so much further with customization. This allows your project to formally document conventions, but also enforce them automatically on every commit, merge, and build. This can make code reviews faster and more focused on the problems your code is meant to solve.


This talk will introduce tools like flake8, import linter, and pre-commit along with some of their built-in functionality. Then, we’ll briefly explore some ways to customize them to fit your projects’ specific needs. Some examples of custom linter rules we’ll tour are:


*Code formatted automatically and uniformly
*Code doesn’t import across architecture layers violating separation of concerns
*Common conventions are used
*Common anti-patterns are avoided
*Specific layers are fully tested
*Proper git commit message formatting
*Merge commits don’t exist in topic/feature branches


Finally, we’ll discuss ways to use those custom linter rules on every commit, merge, and build with continuous integration or git hooks.


#PWC2022 attracted nearly 375 attendees from 36 countries and 21 time zones making it the biggest and best year yet. The highly engaging format featured 90 speakers, 6 tracks (including 80 talks and 4 tutorials) and took place virtually on March 21-25, 2022 on LoudSwarm by Six Feet Up.


More information about the conference can be found at: https://2022.pythonwebconf.com

Комментарии

Информация по комментариям в разработке