Code analysis method and system
A code analysis and code technology, applied in the field of code analysis methods and systems, can solve problems such as incompatibility with enterprise-level code analysis, low code analysis efficiency, poor flexibility, etc., to achieve the effect of improving efficiency and flexibility
Patent Information
- Authority / Receiving Office
- CN · China
- Current Assignee / Owner
- Publication Date
- 2011-09-21
Smart Images
Figure 1 Figure 2 Figure 3
Abstract
Description
technical field
[0001] The invention belongs to the field of computer software, in particular to a code analysis method and system. Background technique
[0002] Code analysis, also known as code scanning or code inspection, mainly checks the degree of compliance of the source code to the standard, the level of readability, the correctness of the code logic expression, and the rationality of the code structure. Through code analysis, you can find problems that violate the programming standards in the program, as well as unsafe, ambiguous and vague parts in the program, and find out the repetitive or non-portable parts in the program. Code analysis includes variable inspection, naming and type inspection, program logic inspection, program syntax inspection, and program structure inspection.
[0003] At present, there are many tools for implementing code analysis, and the technical methods adopted are similar, such as figure 1 As shown, it is generally divided into three par...
Examples
Embodiment Construction
[0022] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
[0023] The embodiment of the present invention collects and processes codes, establishes an index database, uses a high-speed query interface to query, and performs code analysis on the query results, which can greatly improve the efficiency and flexibility of code analysis, and realize enterprise-level code analysis and management.
[0024] figure 2 The implementation flow of the code analysis method provided by the embodiment of the present invention is shown, and the details are as follows:
[0025] In step S101, code information is collected, and an index library is established;
[0026] As ...