CN112256575A - Code quality management method, system and related equipment - Google Patents

Code quality management method, system and related equipment Download PDF

Info

Publication number
CN112256575A
CN112256575A CN202011137901.7A CN202011137901A CN112256575A CN 112256575 A CN112256575 A CN 112256575A CN 202011137901 A CN202011137901 A CN 202011137901A CN 112256575 A CN112256575 A CN 112256575A
Authority
CN
China
Prior art keywords
code
detection
data
intranet
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011137901.7A
Other languages
Chinese (zh)
Inventor
张熹
陈斌
倪军强
金向平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Home Cloud Network Technology Co ltd
Original Assignee
Shenzhen Home Cloud Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Home Cloud Network Technology Co ltd filed Critical Shenzhen Home Cloud Network Technology Co ltd
Priority to CN202011137901.7A priority Critical patent/CN112256575A/en
Publication of CN112256575A publication Critical patent/CN112256575A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3628Software debugging of optimised code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a code quality management method, a system and related equipment, which are used for realizing the automatic timing detection of codes, identifying defect codes and automatically positioning developers of the defect codes, thereby improving the efficiency of code quality management. The method provided by the embodiment of the invention comprises the following steps: configuring a timing task, and triggering and operating a code detection tool and a data acquisition tool in a timing mode, wherein the code detection tool is used for scanning and detecting a full code and generating detection result data, and the data acquisition tool is used for acquiring the detection result data generated by the code detection tool; and determining developers corresponding to the defect code data information in the detection result data according to a preset mapping relation.

Description

Code quality management method, system and related equipment
Technical Field
The present invention relates to the technical field of code quality management, and in particular, to a code quality management method, system and related device.
Background
In order to ensure the quality of software development, in the existing scheme, a software developer manually reviews software codes after the whole program is developed, and verifies the correctness of code logic processing, which is a common practice at present.
The existing scheme is low in efficiency because the rechecking is carried out manually, a plurality of authors writing codes in the whole software development process can be included, and the quality problem detected by the codes cannot be accurately positioned to a defect author.
Disclosure of Invention
The embodiment of the invention provides a code quality management method, a system and related equipment, which are used for realizing the automatic timing detection of codes, identifying defect codes and automatically positioning developers of the defect codes, thereby improving the efficiency of code quality management.
A first aspect of an embodiment of the present invention provides a method for managing code quality, where the method may include:
periodically carrying out full code scanning detection on program codes in a preset storage space in an intranet, and generating detection result data;
acquiring detection result data in the intranet, and pushing the detection result data to the extranet;
and determining developers corresponding to the defect code data information in the detection result data in the external network according to a preset mapping relation.
Optionally, as a possible implementation manner, in the code quality management method in the embodiment of the present invention, the periodically performing full code scanning detection on the program code in the preset storage space in the intranet may include:
and configuring a scheduling program based on a scheduling system software project so as to periodically call a code detection tool to perform full code scanning detection on program codes in a preset storage space in the intranet.
Optionally, as a possible implementation manner, in the code quality management method in the embodiment of the present invention, the performing full-code scanning detection on the program code in the preset storage space in the intranet may include:
and carrying out full code scanning on the program codes in the preset storage space in the intranet, and if the target code segment is identified to accord with the preset code format, judging that the target code segment does not accord with the preset standard.
Optionally, as a possible implementation manner, the code quality management method in the embodiment of the present invention may further include:
and configuring a data conversion program based on Java background development framework software, wherein the data conversion program is used for converting the data format of the acquired defect code data information into a data format compatible with the project management system, and pushing the defect code data information after format conversion to the project management system, so that the project management system pushes a defect code modification task to developers.
Optionally, as a possible implementation manner, the code quality management method in the embodiment of the present invention may further include:
URL transcoding is carried out on the code detection rules in the database so as to adapt to the data format in the code detection tool;
and calling an application program interface of the code detection tool to import the code detection rule after URL transcoding.
A second aspect of an embodiment of the present invention provides a code quality management system, which may include:
the detection module is used for periodically carrying out full code scanning detection on the program codes in the preset storage space in the intranet and generating detection result data;
the pushing module is used for acquiring detection result data in the intranet and pushing the detection result data to the extranet;
and the determining module is used for determining developers corresponding to the defect code data information in the detection result data in the external network according to a preset mapping relation.
Optionally, as a possible implementation manner, in the code quality management system in the embodiment of the present invention, the detection module may include:
and the calling unit is used for configuring a scheduling program based on a scheduling system software project so as to regularly call a code detection tool to perform full code scanning detection on the program codes in the preset storage space in the intranet.
Optionally, as a possible implementation manner, in the code quality management system in the embodiment of the present invention, the code detection tool is configured to perform full code scanning on a program code in a preset storage space in an intranet, and if it is recognized that a target code segment meets a preset code format, it is determined that the target code segment does not meet a preset standard.
Optionally, as a possible implementation manner, the code quality management system in the embodiment of the present invention may further include:
and the processing module is used for configuring a data conversion program based on Java background development framework software, wherein the data conversion program is used for converting the data format of the acquired defect code data information into a data format compatible with the project management system and pushing the defect code data information after format conversion to the project management system, so that the project management system pushes a defect code modification task to developers.
Optionally, as a possible implementation manner, the code quality management system in the embodiment of the present invention may further include:
the transcoding module is used for transcoding the URL of the code detection rule in the database so as to adapt to the data format in the code detection tool;
and the calling module is used for calling an application program interface of the code detection tool to import the code detection rule after URL transcoding.
A third aspect of embodiments of the present invention provides a computer apparatus, which includes a processor, and the processor is configured to implement the steps in any one of the possible implementation manners of the first aspect and the first aspect when executing a computer program stored in a memory.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in any one of the possible implementations of the first aspect and the first aspect.
According to the technical scheme, the embodiment of the invention has the following advantages:
in the embodiment of the invention, before or after the program development is finished, the code quality management system can periodically and automatically detect and identify the defect code data in the intranet, and then determine the developer corresponding to the defect code data information according to the preset mapping relation in the extranet. Compared with the prior art, the embodiment of the invention can realize automatic detection of the codes at regular time, identify the defect codes and automatically position developers of the defect codes, thereby improving the efficiency of code quality management.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a code quality management method according to an embodiment of the present invention;
fig. 2 is a schematic view of a service scenario in a specific application embodiment of the present invention;
FIG. 3 is a schematic diagram of an embodiment of a code quality management system according to an embodiment of the present invention;
FIG. 4 is a diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a code quality management method, a system and related equipment, which are used for realizing the automatic timing detection of codes, identifying defect codes and automatically positioning developers of the defect codes, thereby improving the efficiency of code quality management.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow in the embodiment of the present invention is described below, and referring to fig. 1, an embodiment of a method for managing code quality in the embodiment of the present invention may include:
101. periodically carrying out full code scanning detection on program codes in a preset storage space in an intranet, and generating detection result data;
in view of the fact that the existing scheme is often based on manual code review and low in efficiency, the method and the device can periodically perform full code scanning detection on the program codes in the preset storage space in the intranet and generate detection result data.
102. Acquiring detection result data in the intranet, and pushing the detection result data to the extranet;
in practical application, in order to ensure the safety of data, the detection result data corresponding to the program code is often stored in an intranet, while the development project management system is often in an extranet, for which purpose, the detection result data needs to be pushed to the extranet, and a specific process of pushing the extranet may be through a specific software tool, such as nat app software, which is not limited herein.
103. And determining developers corresponding to the defect code data information in the detection result data according to a preset mapping relation.
In order to locate the developer corresponding to the defect code, in the embodiment of the present invention, a mapping relationship between a position of the code data and the developer may be pre-stored in the external network (for example, a mapping relationship between a page where the code is located and the developer may be set), and after the defect code data is detected, the developer corresponding to the defect code data information (including at least the position of the defect code data) in the detection result data may be determined according to the preset mapping relationship.
In the embodiment of the invention, before or after the program development is finished, the code quality management system can periodically and automatically detect and identify the defect code data in the intranet, and then determine the developer corresponding to the defect code data information according to the preset mapping relation in the extranet. Compared with the prior art, the embodiment of the invention can realize automatic detection of the codes at regular time, identify the defect codes and automatically position developers of the defect codes, thereby improving the efficiency of code quality management.
Optionally, on the basis of the embodiment shown in fig. 1, optionally, the code quality management system may configure a scheduler timing task based on a scheduling system software project (e.g., jenkins software project), and periodically trigger the running code detection tool to perform full code scanning detection on the program code in the preset storage space in the intranet. The jenkins software project is an open-source software project, is a continuous integration tool developed based on Java, is used for monitoring continuous and repeated work, provides an open and easy-to-use software platform, and can enable continuous integration of software to be more convenient. It is understood that the Code detection tool in the embodiment of the present invention may adopt common tools, such as sonar (sonar cube) tools (supporting Code quality management and detection of java, C #, C/C + +, PL/SQL, Cobol, javascript, Groovy, and twenty programming languages), Fortify SCA (Source Code Analysis) tools, checkmark CxSuite tools, and the like, and may also customize a Code detection rule according to actual requirements, and then independently run detection or introduce the Code detection rule into the Code detection tool to run detection, which is not limited herein.
Optionally, in the process of scanning the full code of the program code in the preset storage space in the intranet by the code detection tool, if the target code segment is identified to conform to the preset code format, it is determined that the target code segment does not conform to the preset standard.
For example, when it is desired to identify non-standard usage of null pointers, the code format may be preset as follows:
public int lengthPlus(String str){int len=2;try{len+=str.length();}catch(NullPointerException e){log.info("argument was null");}return len;}
if the code format corresponding to the non-standard usage of the null pointer is identified, modification to the standard usage can be suggested: public int length plus (String str) { int len ═ 2; if (str | =) { len + } str. length (); else { log.info null ]; return len; }
For example, when the condition judgment redundant program needs to be identified, the code format may be preset as follows:
a ═ false; if (a) {// nonompliant dosemeting (); // never executed }
if (! a | | b) {// Noncompliant; "! a "is always" true "," b "is near evolved dosemeting (); else { dosemethoshingeelse (); // never executed }.
If the condition is identified to judge the code format corresponding to the redundant program, modification into a standard usage can be suggested: when the condition is a single linear debug ═ false; if/Print sensing When the condition is true if.
Optionally, as a possible implementation manner, in the embodiment of the present invention, the code quality management system may perform URL transcoding on the code detection rule in the database to adapt to a data format in the code detection tool; and calling an application program interface of a code detection tool to import the code detection rule after URL transcoding.
Optionally, on the basis of the embodiment shown in fig. 1, as a possible implementation manner, in an embodiment of the present invention, the code quality management system may further configure a data conversion program based on Java background development framework software (for example, a Spring Boot project), where the data conversion program is configured to convert a data format of the obtained defect code data information into a data format compatible with the project management system, and push the defect code data information after format conversion to the project management system, so that the project management system pushes a defect code modification task to a developer. The code data information may optionally include four fields such as "title", "detailed description", "question link", "developer", and field value thereof.
The Spring Boot is a light-weight framework of a brand-new open source, which is developed by Pivotal team in 2013 and releases a first version in 2014 in 4, and initial building and development processes of a new Spring application are simplified.
For convenience of understanding, please refer to the service scenario diagram in fig. 2, and the following describes the code quality management method in the embodiment of the present invention with reference to a specific application embodiment, which may specifically include the following steps:
based on the scheduling system jenkins software tool, a timing task is configured, a code detection tool in the code detection system is triggered to perform full code scanning at the first set time every day, a data acquisition tool is triggered to acquire the scanning error of the code detection tool at the second set time, and the obtained data is stored in the intranet, and then the data is pushed from the intranet to the extranet and to the extranet, data are pushed to a database of a project management system by calling a data aggregation service (defect code data information is combined into a json string form, different defect code data information is subjected to row processing to finally form a file in the json format) and a data warehousing service (the data format of the defect code data information is converted into a data format compatible with the project management system), and meanwhile, errors are automatically pushed to an author according to the author by the project management system.
The CODE detection rule in the CODE detection tool supports dynamic configuration, the field of 'error type' in the CODE detection rule can be subjected to url transcoding through a configuration rule (for example, source CODE: s1698, after conversion: squid% 3AS2259), the CODE detection rule can detect that the development language type can comprise mainstream development languages such AS java, C + +, C, python, js, PHP, HTML and the like, the CODE detection rule can be dynamically configured for the collected error type, and the specific error type can comprise BUG, VULNEABILITY (VULNERABILITY), CODE _ SMELL (bad taste) and the like. The dynamic configuration of the scanning time range can be supported, for example, the 20190502 and the 20190502 time end are configured, and specifically, the data acquisition tool script can be compiled by acquiring the data script and calling a time function to configure time data conversion of year, month, day, time, minute, second and millisecond.
The data warehousing service is a data conversion program configured on the basis of a Spring Boot project, the data conversion program is used for converting the data format of the acquired defect code data information into a data format compatible with a project management system, and the defect code data information after format conversion is pushed to the project management system, so that the project management system pushes a defect code modification task to developers.
In this implementation, the code quality detection system scans the code library regularly according to the preset code detection rules to read the defect code data and locate the development engineer of the defect code data, the data is automatically pushed to the project management system, and the project management system pushes the data to the development engineer point to point, for example, the mail system can push the errors to the author to modify the codes regularly. The quality control integrally plans the error modification condition in a project management system, so that the code quality of the product updating iteration process becomes observable and controllable.
Referring to fig. 3, an embodiment of the present invention further provides a code quality management system, which includes:
the detection module 301 is configured to periodically perform full code scanning detection on program codes in a preset storage space in an intranet, and generate detection result data;
the pushing module 302 is configured to collect detection result data in the intranet and push the detection result data to the extranet;
and the determining module 303 is configured to determine, in the external network, developers corresponding to the defect code data information in the detection result data according to a preset mapping relationship.
Optionally, as a possible implementation manner, in the code quality management system in the embodiment of the present invention, the detection module may include:
and the calling unit is used for configuring a scheduling program based on a scheduling system software project so as to regularly call a code detection tool to perform full code scanning detection on the program codes in the preset storage space in the intranet.
Optionally, as a possible implementation manner, in the code quality management system in the embodiment of the present invention, the code detection tool is configured to perform full code scanning on a program code in a preset storage space in an intranet, and if it is identified that the target code segment meets a preset code format, it is determined that the target code segment does not meet a preset standard.
Optionally, as a possible implementation manner, the code quality management system in the embodiment of the present invention may further include:
and the processing module is used for configuring a data conversion program based on Java background development framework software, wherein the data conversion program is used for converting the data format of the acquired defect code data information into a data format compatible with the project management system and pushing the defect code data information after format conversion to the project management system, so that the project management system pushes a defect code modification task to developers.
Optionally, as a possible implementation manner, the code quality management system in the embodiment of the present invention may further include:
the transcoding module is used for transcoding the URL of the code detection rule in the database so as to adapt to the data format in the code detection tool;
and the calling module is used for calling an application program interface of the code detection tool to import the code detection rule after URL transcoding.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The code quality management system in the embodiment of the present invention is described above from the perspective of the modular functional entity, and referring to fig. 4, the following describes the computer apparatus in the embodiment of the present invention from the perspective of hardware processing:
the computer device 1 may include a memory 11, a processor 12 and an input output bus 13. The processor 11, when executing the computer program, implements the steps in the above-described embodiment of the code quality management method shown in fig. 1, such as the steps 101 to 103 shown in fig. 1. Alternatively, the processor, when executing the computer program, implements the functions of each module or unit in the above-described device embodiments.
In some embodiments of the present invention, the processor is specifically configured to implement the following steps:
periodically carrying out full code scanning detection on program codes in a preset storage space in an intranet, and generating detection result data;
acquiring detection result data in the intranet, and pushing the detection result data to the extranet;
and determining developers corresponding to the defect code data information in the detection result data according to a preset mapping relation in the external network.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
and configuring a scheduling program based on a scheduling system software project so as to periodically call a code detection tool to perform full code scanning detection on program codes in a preset storage space in the intranet.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
and carrying out full code scanning on the program codes in the preset storage space in the intranet, and if the target code segment is identified to accord with the preset code format, judging that the target code segment does not accord with the preset standard.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
and configuring a data conversion program based on Java background development framework software, wherein the data conversion program is used for converting the data format of the acquired defect code data information into a data format compatible with the project management system and pushing the defect code data information after format conversion to the project management system so that the project management system pushes a defect code modification task to developers.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
URL transcoding is carried out on the code detection rule in the database so as to adapt to the data format in the code detection tool;
and calling an application program interface of a code detection tool to import the code detection rule after URL transcoding.
The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the computer device 1, for example a hard disk of the computer device 1. The memory 11 may also be an external storage device of the computer apparatus 1 in other embodiments, such as a plug-in hard disk provided on the computer apparatus 1, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 11 may also include both an internal storage unit and an external storage device of the computer apparatus 1. The memory 11 may be used not only to store application software installed in the computer apparatus 1 and various types of data, such as codes of the computer program 01, but also to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as executing the computer program 01.
The input/output bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc.
Further, the computer apparatus may further include a wired or wireless network interface 14, and the network interface 14 may optionally include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the computer apparatus 1 and other electronic devices.
Optionally, the computer device 1 may further include a user interface, the user interface may include a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally, the user interface may further include a standard wired interface and a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the computer device 1 and for displaying a visualized user interface.
Fig. 4 shows only the computer arrangement 1 with the components 11-14 and the computer program 01, it being understood by a person skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the computer arrangement 1, but may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
The present invention also provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of:
periodically carrying out full code scanning detection on program codes in a preset storage space in an intranet, and generating detection result data;
acquiring detection result data in the intranet, and pushing the detection result data to the extranet;
and determining developers corresponding to the defect code data information in the detection result data according to a preset mapping relation in the external network.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
and configuring a scheduling program based on a scheduling system software project so as to periodically call a code detection tool to perform full code scanning detection on program codes in a preset storage space in the intranet.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
and carrying out full code scanning on the program codes in the preset storage space in the intranet, and if the target code segment is identified to accord with the preset code format, judging that the target code segment does not accord with the preset standard.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
and configuring a data conversion program based on Java background development framework software, wherein the data conversion program is used for converting the data format of the acquired defect code data information into a data format compatible with the project management system and pushing the defect code data information after format conversion to the project management system so that the project management system pushes a defect code modification task to developers.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
URL transcoding is carried out on the code detection rule in the database so as to adapt to the data format in the code detection tool;
and calling an application program interface of a code detection tool to import the code detection rule after URL transcoding.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A code quality management method, comprising:
periodically carrying out full code scanning detection on program codes in a preset storage space in an intranet, and generating detection result data;
acquiring detection result data in the intranet, and pushing the detection result data to the extranet;
and determining developers corresponding to the defect code data information in the detection result data in the external network according to a preset mapping relation.
2. The method according to claim 1, wherein the periodically performing full code scanning detection on the program codes in the preset storage space in the intranet comprises:
and configuring a scheduling program based on a scheduling system software project so as to periodically call a code detection tool to perform full code scanning detection on program codes in a preset storage space in the intranet.
3. The method according to claim 2, wherein the performing full code scanning detection on the program codes in the preset storage space in the intranet comprises:
and carrying out full code scanning on the program codes in the preset storage space in the intranet, and if the target code segment is identified to accord with the preset code format, judging that the target code segment does not accord with the preset standard.
4. The method of claim 2, further comprising:
and configuring a data conversion program based on Java background development framework software, wherein the data conversion program is used for converting the data format of the acquired defect code data information into a data format compatible with the project management system, and pushing the defect code data information after format conversion to the project management system, so that the project management system pushes a defect code modification task to developers.
5. The method of any of claims 2 to 4, further comprising:
URL transcoding is carried out on the code detection rules in the database so as to adapt to the data format in the code detection tool;
and calling an application program interface of the code detection tool to import the code detection rule after URL transcoding.
6. A code quality management system, comprising:
the detection module is used for periodically carrying out full code scanning detection on the program codes in the preset storage space in the intranet and generating detection result data;
the pushing module is used for acquiring detection result data in the intranet and pushing the detection result data to the extranet;
and the determining module is used for determining developers corresponding to the defect code data information in the detection result data in the external network according to a preset mapping relation.
7. The system of claim 6, wherein the detection module comprises:
and the calling unit is used for configuring a scheduling program based on a scheduling system software project so as to regularly call a code detection tool to perform full code scanning detection on the program codes in the preset storage space in the intranet.
8. The system of any one of claims 5 to 7, further comprising:
the transcoding module is used for transcoding the URL of the code detection rule in the database so as to adapt to the data format in the code detection tool;
and the calling module is used for calling an application program interface of the code detection tool to import the code detection rule after URL transcoding.
9. A computer arrangement, characterized in that the computer arrangement comprises a processor for implementing the steps of the method according to any one of claims 1 to 5 when executing a computer program stored in a memory.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program when executed by a processor implementing the steps of the method according to any one of claims 1 to 5.
CN202011137901.7A 2020-10-22 2020-10-22 Code quality management method, system and related equipment Pending CN112256575A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011137901.7A CN112256575A (en) 2020-10-22 2020-10-22 Code quality management method, system and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011137901.7A CN112256575A (en) 2020-10-22 2020-10-22 Code quality management method, system and related equipment

Publications (1)

Publication Number Publication Date
CN112256575A true CN112256575A (en) 2021-01-22

Family

ID=74264678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011137901.7A Pending CN112256575A (en) 2020-10-22 2020-10-22 Code quality management method, system and related equipment

Country Status (1)

Country Link
CN (1) CN112256575A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113190805A (en) * 2021-05-31 2021-07-30 世纪龙信息网络有限责任公司 Code asset management system
CN113791818A (en) * 2021-09-15 2021-12-14 上海浦东发展银行股份有限公司 Code improvement method, device, medium and equipment based on measurement platform

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013174200A1 (en) * 2012-05-24 2013-11-28 腾讯科技(深圳)有限公司 Code analysis method and code analysis system, computer storage media
CN105320591A (en) * 2014-07-25 2016-02-10 腾讯科技(深圳)有限公司 Code detection method and device
CN106776270A (en) * 2016-11-11 2017-05-31 努比亚技术有限公司 A kind of code detection method, device and terminal
CN109359028A (en) * 2018-08-22 2019-02-19 平安科技(深圳)有限公司 Code quality monitoring method, device, computer equipment and storage medium
US20190294526A1 (en) * 2018-03-22 2019-09-26 Veracode, Inc. Code difference flaw scanner
US20200097390A1 (en) * 2018-09-21 2020-03-26 Pivotal Software, Inc. Platform-integrated ide

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013174200A1 (en) * 2012-05-24 2013-11-28 腾讯科技(深圳)有限公司 Code analysis method and code analysis system, computer storage media
CN105320591A (en) * 2014-07-25 2016-02-10 腾讯科技(深圳)有限公司 Code detection method and device
CN106776270A (en) * 2016-11-11 2017-05-31 努比亚技术有限公司 A kind of code detection method, device and terminal
US20190294526A1 (en) * 2018-03-22 2019-09-26 Veracode, Inc. Code difference flaw scanner
CN109359028A (en) * 2018-08-22 2019-02-19 平安科技(深圳)有限公司 Code quality monitoring method, device, computer equipment and storage medium
US20200097390A1 (en) * 2018-09-21 2020-03-26 Pivotal Software, Inc. Platform-integrated ide

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113190805A (en) * 2021-05-31 2021-07-30 世纪龙信息网络有限责任公司 Code asset management system
CN113791818A (en) * 2021-09-15 2021-12-14 上海浦东发展银行股份有限公司 Code improvement method, device, medium and equipment based on measurement platform
CN113791818B (en) * 2021-09-15 2024-04-30 上海浦东发展银行股份有限公司 Code improvement method, device, medium and equipment based on measurement platform

Similar Documents

Publication Publication Date Title
US8612372B2 (en) Detection rule-generating facility
US8943423B2 (en) User interface indicators for changed user interface elements
EP3623948B1 (en) Method and system for code analysis to identify causes of code smells
CN111797157B (en) Data processing method, system, electronic equipment and storage medium
WO2014120192A1 (en) Error developer association
CN109656917A (en) Data detection method, device, equipment and the readable storage medium storing program for executing of multi-data source
CN111459495A (en) Unit test code file generation method, electronic device and storage medium
CN111045927A (en) Performance test evaluation method and device, computer equipment and readable storage medium
CN110908915A (en) Test coverage rate display method and device and computer system
US6745348B2 (en) Method for estimating number of internationalization faults in software code
US9563541B2 (en) Software defect detection identifying location of diverging paths
CN115269444A (en) Code static detection method and device and server
CN108427580A (en) Configure detection method, storage medium and the smart machine repeated to name
CN113342692B (en) Automatic test case generation method and device, electronic equipment and storage medium
CN112256575A (en) Code quality management method, system and related equipment
CN112433942A (en) Software automation testing method, device and system based on artificial intelligence model
CN114500334B (en) Diagnosis method and device for server application architecture
CN102339224A (en) System and method for use in indicating execution of application code
CN107291614B (en) File abnormity detection method and electronic equipment
CN109358564B (en) Method and device for detecting configuration software and computer readable storage medium
CN113868137A (en) Method, device and system for processing buried point data and server
CN111666216B (en) Intelligent contract analysis method and device
CN114625633A (en) Method, system and storage medium for interface testing
CN112003837B (en) Intelligent equipment adaptation method and device based on Modbus protocol and storage medium
WO2021129024A1 (en) Method for recognizing state of communication device, and communication system and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination