Checking Code Quality
00:00 Now you know what makes a code high-quality. But when do you make sure the code is, well, actually high-quality? Well, the first thing that you should know is that you should check the quality of your code frequently. If you don’t have automation and consistency, issues pile up slowly, one at a time, until your codebase becomes buggy, hard to read, and painful to extend.
00:24 To avoid that, check your code at three important stages. When you write it, use tools like linters, type checkers, formatters, and vulnerability checkers. You can even set them up in your editor so they can just run automatically while you write and save your code.
00:44 When you commit it, you can use pre-commit hooks. These can run checks before your code enters a codebase and block anything that doesn’t meet your standards. And when you test it, you can run your test suite frequently.
00:59 A failing test is not just a problem, it’s a useful signal that something needs to be fixed or improved. Now that you know when to check your code quality throughout your coding cycle and also what traits to look out for and also how to implement them practically, it’s time for a quick summary of everything.
Become a Member to join the conversation.
