Code Review Technology
Code Review is a quality assurance mechanism for verifying the design and implementation of a scheme by reading the code to check the compliance of the source code with the coding specification and the quality of the code.
The role of code review
- Check the rationality of the design
- Backup to each other
- Sharing knowledge, design, technology
- Add code Readability
- Handling "mine zone" in code
Defect Check List
Python Code analysis tool
Pylint is a Python Code analysis tool that analyzes the errors of Python code, looks for code style standards that do not conform (Pylint the code style used by default is PEP 8), and potentially problematic code.
Pylint function
- Check if code style conforms to PEP8 specification
- Check code for common errors and violation of best practices
- Check for duplicate code
Pylint Installation and use
Pylint Installation:
pip install -U pylint # 安装最新版的Pylint
Pylint using:
pylint [op0ons] module_or_package_or_file # 对模块/包/文件运行pylint
--rcfile= Specifies the configuration file to check
--ignore= list of files that are not checked
--disable= Close some kind of check
-F Report type, such as HTML
Code Static Analysis Tool
- Checkstyle: through code coding format, naming convention, Javadoc, class design and so on, the specification and style of inspection.
- FindBugs: by examining a class file or jar file, the bytecode is compared to a set of defect patterns to uncover code flaws and complete static code analysis.
- PMD: static checking of Java code through its built-in coding rules, mainly including the validation of potential bugs, unused code, duplicated code, new objects created by the loop body, and so on.
Jtest: the ability to automatically check and correct these hidden and hard-to-fix coding errors in accordance with its built-in Java coding specifications of more than 800, while also supporting user-defined coding rules to help prevent some special usage errors.
The Code analysis tool in Microsoft Visual Studio can check the code for common flaws and violations of good programming habits.
- The Code analysis tool in Microsoft Visual Studio can check the code for common flaws and violations of good programming habits.
- jshint (www.jshint.com) is a JavaScript code validation tool that detects errors and potential problems in your code.
- csslint (csslint.net) is a CSS code checker that checks for basic syntax and uses a set of preset rules to check for problems in your code.
- Htmlhint (htmlhint.com) is a JS-based static scanning component that supports all browsers and NODEJS platforms that can be integrated into IDE environments or compiled systems.
Code static Check