Skip to article frontmatterSkip to article content

PrerequisiteImportance
Experience with the command lineHelpful

Summary

There are several ways to improve software quality that require relatively little effort. By following a coding style, code will be easier for yourself and others to understand and therefore it will contain fewer bugs. Tools for static code analysis can report bugs as well as style issues without even running the code.

Static code analysis

Static code analysis is a method that examines code and detects software vulnerabilities before your code is executed or the project is built and deployed. This analysis is capable of identifying quality issues, including security weaknesses and errors. In addition to finding bugs, many of these tools can also help maintain a consistent coding style.

Advantages of Static code analysis

Some of the most widely used linters are mentioned in the below table:

LanguageStatic code analysis tool
C/C++Cppcheck, cpplint
PythonPylint, prospector
JavascriptESLint, JSlint, JSHint
JavaCheckstyle, FindBugs, PMD
PerlPerlTidy
Rlintr
Shell/Bashshellcheck