Lint or linter is a static code analysis tool that was originally introduced in 1978. It is used to flag programming errors, stylistic errors or bugs.
Typically you will find developers using lint testing on their software code. But it is also something that is now being used by SysAdmins, DevOps engineers and the like.
Lint testing can be carried out on Infrastructure as Code (IaC) again to flag any errors, formatting discrepancies, or bugs or best practice violations.
Why is Linting important?
Performing lint test, or linting your code is important to help reduce errors and ultimately improve the overall quality of your code.
Lint testing should be done early on in the development of your code, whether that is software code or Infrastructure as Code. It will help to spot any errors early and help your code writers focus on the right things.
How to Lint test?
Depending on what you are creating and what your code is there are multiple ways of doing lint testing.
If you are creating your code within something like Visual Studio Code, you may find there is a plugin that can be used to help lint testing your code as you write it or to help test it at various different stages.
Another method is performing lint testing when code is checked into your source repository. When building out your DevOps Continuous Integration (CI)/Continuous Deployment (CD) pipeline, lint testing would be part of your CI process.