CN117312156A - Code quality assessment method and device - Google Patents

Code quality assessment method and device Download PDF

Info

Publication number
CN117312156A
CN117312156A CN202311268585.0A CN202311268585A CN117312156A CN 117312156 A CN117312156 A CN 117312156A CN 202311268585 A CN202311268585 A CN 202311268585A CN 117312156 A CN117312156 A CN 117312156A
Authority
CN
China
Prior art keywords
code
type
codes
vue
file
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
CN202311268585.0A
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202311268585.0A priority Critical patent/CN117312156A/en
Publication of CN117312156A publication Critical patent/CN117312156A/en
Pending legal-status Critical Current

Links

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/3604Software analysis for verifying properties of programs
    • G06F11/3616Software analysis for verifying properties of programs using software metrics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (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 application provides a code quality assessment method and device, which are applied to the technical field of data processing and are used for achieving quality assessment of codes and improving efficiency and accuracy of code quality assessment. The method comprises the steps of obtaining a vue type file from a static module packaging tool Webpack of an application program, wherein the vue type file contains at least one type of code, and the at least one type of code comprises one or more of template code, data, logic code and style code; performing quality evaluation on each type of code according to an evaluation rule of each type of code in the at least one type of code; and outputting the quality evaluation record of each type of codes in the at least one type of codes.

Description

Code quality assessment method and device
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method and an apparatus for evaluating code quality.
Background
Code quality assessment is an important step in the code development process, and can help technicians find problems and potential errors in codes, so that written programs can be guaranteed to have high quality, reliability and maintainability. The code quality assessment in the prior art is usually implemented by means of manual auditing, which is relatively labor-and time-consuming, and the manual auditing can also be neglected.
At present, a method and a device for evaluating the quality of a front-end code written for a Vue.js framework are needed, and the method and the device are used for realizing specific problems of positioning codes and improving the efficiency and the accuracy of code quality evaluation.
Disclosure of Invention
The application provides a method and a device for detecting code quality, which are used for realizing quantization and evaluation of codes and improving the efficiency and accuracy of code quality evaluation.
In a first aspect, the present application provides a code quality assessment method, applicable to an electronic device having processing capabilities, such as a data processor, a computer, a memory, etc., the method comprising:
acquiring vue type files from a static module packaging tool Webpack of the application program, wherein the vue type files contain at least one type of code comprising one or more of template code, data, logic code and style code; performing quality evaluation on each type of code according to the evaluation rule of each type of code in the at least one type of code; and outputting the quality evaluation record of each type of code in the at least one type of code.
According to the method, the electronic equipment acquires a vue type file (namely, a code file written based on a Vue. Js framework), and automatically carries out quality evaluation on each type of code in at least one type of code according to the quality evaluation rule of each type of code in at least one type of code contained in the vue type file, and further, can locate specific problems of each type of code in at least one type of code according to the quality evaluation record of each type of code in at least one type of code, so that the efficiency and accuracy of code quality evaluation are improved.
Optionally, the quality assessment record includes an unsatisfactory target code and a reason for the unsatisfactory target code.
In the method, specific problem codes (namely, target codes which do not meet the requirements) and specific problems of the problem codes can be positioned according to the quality evaluation record, so that the reliability of the method is improved.
Optionally, the vue type file contains at least one string of template codes; performing quality assessment on each type of code according to an assessment rule of each type of code in the at least one type of code, including: storing at least one string of template codes into a preset list, wherein one row of the at least one string of template codes corresponds to one column of the preset list; detecting whether the total character number of each column of template codes in the list meets the preset character number requirement, and recording the template codes which do not meet the preset character number requirement.
In the method, aiming at a type vue file containing at least one string of template codes, the template codes in the type vue file are stored in a preset list, wherein each row of the template codes corresponds to each column in the preset list, so that the template codes in the preset list can be conveniently traversed, the quality evaluation is carried out on each column of the template codes in the preset list, the efficiency of code quality evaluation can be improved, the quality of the template codes is evaluated based on the number of characters, and the template codes which do not meet the requirement of the preset number of characters in the type vue file can be positioned.
Optionally, the method further comprises: detecting whether each column of template codes in the list contains a component tag or not, wherein the component tag is used for indicating that the template code of the column in which the component tag is located is an external introduction code; detecting whether the component labels in each column of template codes meet the requirements of preset component labels or not according to each column of template codes with the component labels, and recording the template codes which do not meet the requirements of the preset component labels; the preset component tag requirement comprises that the name of the component tag is a name of a preset type and/or the attribute of an element in the component tag is a preset attribute.
In the method, whether the component labels of the template codes accord with the rule or not can be detected, and the template codes, which do not accord with the requirements, of the component labels in the template codes of the vue type file can be positioned, so that the component labels which are problematic in the template codes can be conveniently solved by subsequent technicians, and the reliability of the method is improved.
Optionally, the vue type file contains at least one string of data and logical code; performing quality assessment on each type of code according to an assessment rule of each type of code in the at least one type of code, including: detecting whether at least one string of data and logic code contains an external lead-in code; if so, further detecting whether the external lead-in code is used when at least one string of data and logic codes is run, and recording the unused external lead-in code; and/or converting codes except the externally introduced codes in the data and the logic codes into at least one object type, detecting whether the attribute of each object type in the at least one object type is a preset attribute, and recording the codes corresponding to the object types which are not the preset attribute.
In the method, data and logic codes in a vue type file are divided into two parts for code quality evaluation, firstly, whether external lead-in codes in the data and logic codes are used when the data and logic codes are operated is detected, so that staff can conveniently check anomalies such as code redundancy or program error and the like possibly caused by unused external lead-in codes; and secondly, the codes of the externally introduced codes are removed from the data and the logic codes, the codes are converted into at least one object type, whether the attribute of the at least one object type meets the requirement is detected, the attribute of the object type which is convenient for a subsequent technician to solve the problem in the data and the logic codes, and the reliability of the application is improved.
Optionally, the vue type file contains at least one string of style codes; performing quality assessment on each type of code according to an assessment rule of each type of code in the at least one type of code, including: detecting whether each string of style codes in at least one string of style codes contains a style label, and recording the style codes without the style label.
According to the method, whether the pattern label of the sample code accords with the rule is detected according to the quality evaluation rule of the pattern code in the vue type file, whether the pattern label of the sample code has a problem can be determined, the problem of the pattern label in the sample code can be solved by a subsequent technician conveniently, and the reliability of the method is improved.
Optionally, the method further comprises: evaluating all codes in the vue type file according to the overall code evaluation rule; and outputting quality evaluation records of all codes.
Optionally, all codes in the vue type file are evaluated according to overall code evaluation rules, including: detecting whether the name of the vue type file meets the preset name requirement, and if not, recording; detecting whether the total number of the codes of the vue type file meets the preset number of the lines, and if not, recording; detecting whether the code structure of the vue type file accords with the preset code compiling sequence, and if not, recording.
In the method, all codes in the file of the type vue are taken as a whole, and the quality evaluation is carried out on all codes according to the quality evaluation rule of the whole codes, so that the code compiling mode of the file of the type vue can be unified, and a technician can conveniently and quickly check and position the patterns and the structure problems in the whole codes of the file of the type vue; further, whether the code structure of the vue type file accords with the preset code compiling sequence is detected according to the quality evaluation rule of the whole code, so that the position of each type of code in at least one type of code contained in the whole code is conveniently obtained according to the preset code compiling sequence, and the code quality evaluation is carried out on each type of code in at least one type of code contained in the whole code of the vue type file, so that the reliability of the application can be improved.
Alternatively, the vue type file is obtained from a static module packaging tool Webpack of the application, including: subscribing to a compiling completion event of the Webpack for the code file; receiving a compiling completion event sent by the Webpack, and calling an interface provided by the Webpack to obtain a vue type file in the compiling completion code file; binary data in the type vue file is converted into a character string, and the type vue file with the character string type is obtained.
In the method, the compiling completed type vue file is obtained in a static module packaging tool Webpack of the accessed application program, so that the compiling process of other type files or the compiling completed type vue file is not influenced when the type vue file is obtained; the type vue file obtained from Webpack is binary data, the binary data needs to be converted into a character string (namely, a computer readable machine language is converted into a code readable by a technician), and the code quality evaluation is performed on the type vue file based on the character string type, so that the quality evaluation is conveniently performed on the code of the type vue file according to the corresponding code quality evaluation rule, and the reliability of the application is improved.
Optionally, outputting the result of the code quality assessment includes: and sending a code quality assessment completion event to the Webpack, and outputting quality assessment records of all codes and quality assessment records of each type of code in at least one type of code.
In the method, the quality evaluation records of all codes in the vue type file and the quality evaluation records of each type of codes in at least one type of codes are output, so that technicians can conveniently analyze specific problems of each type of codes in the vue type file, and the reliability of the method can be improved.
In a second aspect, the present application provides a code quality assessment apparatus, comprising: the system comprises an acquisition module, a model generation module and a model generation module, wherein the acquisition module is used for acquiring vue type files from a static module packaging tool Webpack of an application program, wherein the vue type files contain at least one type of codes, and the at least one type of codes comprises one or more of template codes, data, logic codes and style codes; the processing module is used for executing quality evaluation on each type of code according to the evaluation rule of each type of code in at least one type of code; and the output module is used for outputting the quality evaluation record of each type of codes in the at least one type of codes.
Optionally, the quality assessment record includes an unsatisfactory target code and a reason for the unsatisfactory target code.
Optionally, the vue type file contains at least one string of template codes; the processing module is used for performing quality evaluation on each type of code according to the evaluation rule of each type of code in the at least one type of code: storing at least one string of template codes into a preset list, wherein one row of the at least one string of template codes corresponds to one column of the preset list; detecting whether the total character number of each column of template codes in the list meets the preset character number requirement, and recording the template codes which do not meet the preset character number requirement.
Optionally, the processing module is further configured to: detecting whether each column of template codes in the list contains a component tag or not, wherein the component tag is used for indicating that the template code of the column in which the component tag is located is an external introduction code; detecting whether the component labels in each column of template codes meet the requirements of preset component labels or not according to each column of template codes storing the component labels, and recording the template codes which do not meet the requirements of the preset component labels; the preset component tag requirement comprises that the name of the component tag is a name of a preset type and/or the attribute of an element in the component tag is a preset attribute.
Optionally, the vue type file contains at least one string of data and logical code; the processing module is used for performing quality evaluation on each type of code according to the evaluation rule of each type of code in at least one type of code: detecting whether at least one string of data and logic code contains an external lead-in code; if so, further detecting whether the external lead-in code is used when at least one string of data and logic codes is run, and recording the unused external lead-in code; and/or converting codes except the externally introduced codes in the data and the logic codes into at least one object type, detecting whether the attribute of each object type in the at least one object type is a preset attribute, and recording codes corresponding to the object types which are not the preset attribute.
Optionally, the vue type file contains at least one string of style codes; the processing module is used for performing quality evaluation on each type of code according to the evaluation rule of each type of code in at least one type of code: detecting whether each string of style codes in at least one string of style codes contains a style label, and recording the style codes without the style label.
Optionally, the processing module is further configured to: evaluating all codes in the vue type file according to the overall code evaluation rule; and outputting quality evaluation records of all codes.
Optionally, the processing module is configured to perform at least one of the following operations when evaluating the quality of the overall code according to the overall code evaluation rule: detecting whether the name of the vue type file meets the preset name requirement, and if not, recording; and (3) detection: the vue type file code total line number meets the preset line number requirement, if not, recording; detecting whether the code structure of the vue type file accords with the preset code compiling sequence, and if not, recording.
Optionally, the processing module, when obtaining the vue type file from the static module packaging tool weback of the application, is configured to: subscribing to a compiling completion event of the Webpack for the code file; receiving a compiling completion event sent by the Webpack, and calling an interface provided by the Webpack to obtain a vue type file in the compiling completion code file; binary data in the type vue file is converted into a character string, and the type vue file with the character string type is obtained.
Optionally, the output module is configured to: and sending a code quality assessment completion event to the Webpack, and outputting quality assessment records of all codes and quality assessment records of each type of code in at least one type of code.
In a third aspect, embodiments of the present application provide an electronic device comprising at least one processor configured to cause a method as in the first aspect or any of the alternative embodiments of the first aspect to be implemented when executing a computer program stored in a memory.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium for storing instructions that, when executed, cause a method as in the first aspect or any of the alternative embodiments of the first aspect to be implemented.
In a fifth aspect, embodiments of the present application provide a computer program product comprising computer program code which, when run on a computer, causes the method as in the first aspect or any of the alternative embodiments of the first aspect to be implemented.
The technical effects or advantages of one or more technical solutions provided in the second, third, fourth, and fifth aspects of the embodiments of the present application may be correspondingly explained by the technical effects or advantages of the corresponding one or more technical solutions provided in the first aspect.
Drawings
Fig. 1 is a flowchart of a code quality evaluation method provided in an embodiment of the present application;
FIG. 2 is an example of a method for obtaining vue type files provided by an embodiment of the present application;
FIG. 3 is an example of quality assessment of HTML template code provided by an embodiment of the present application;
FIG. 4 is an example of quality assessment of data and logic code provided by an embodiment of the present application;
FIG. 5 is an example of data and logic code provided by an embodiment of the present application;
FIG. 6 is an example of quality assessment of style codes provided by embodiments of the present application;
FIG. 7 is an example of quality assessment of an overall code provided by an embodiment of the present application;
FIG. 8 is an example of an output code quality assessment record provided by an embodiment of the present application;
FIG. 9 is an example of calculating various types of code scores provided by embodiments of the present application;
FIG. 10 is an example of a vue type file code provided by an embodiment of the present application;
FIG. 11 is an example of acquiring various types of code based on the structure of a vue type file provided by an embodiment of the present application;
FIG. 12 is a specific example of a vue type file code quality assessment provided by an embodiment of the present application;
fig. 13 is a block diagram of a code quality evaluation device according to an embodiment of the present application;
Fig. 14 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the technical scheme, the data are collected, transmitted, used and the like, and all meet the requirements of national related laws and regulations.
The following detailed description of the technical solutions of the present application will be made with reference to the accompanying drawings and specific embodiments, and it should be understood that the specific features of the embodiments of the present application are detailed descriptions of the technical solutions of the present application, and not limiting the technical solutions of the present application, and the technical features of the embodiments of the present application may be combined with each other without conflict.
It should be understood that "plurality" in the description of the embodiments of the present application refers to two and more. The term "and/or" in the embodiments of the present application is merely an association relationship describing an association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the associated object is an "or" relationship.
The technical scheme provided by the embodiment of the application is used for realizing quality evaluation of the front-end code written by the Vue. Js framework, locating specific problems of the code and improving the efficiency and accuracy of code quality evaluation.
The embodiment of the application can be used as a static packing tool for accessing an application program by a plug-in unit, such as a weback platform, and has strong portability and universality.
Referring to fig. 1, a flowchart of a code quality evaluation method according to an embodiment of the present application is provided, where an execution subject of the method may be any electronic device with processing capabilities, such as a data processor, a computer, a memory, etc. The method comprises the steps of S101 to S103:
s101, acquiring a vue type file from a static module packaging tool Webpack of an application program, wherein the vue type file contains at least one type of code comprising one or more of template code, data, logic code and style code.
The Webpack is a static packing tool for a modern JavaScript application program, a module generated by a Vue.js front end framework can be compiled into HTML, javaScript and css type files which can be identified by a browser, and meanwhile, the Webpack provides rich external interfaces, so that the platform can be accessed in a plug-in mode to expand functions of the platform.
Vue type file (vue. Js) is a JavaScript framework for building user interfaces. It builds on standard HTML, CSS, and JavaScript, and provides a set of declarative, componentized programming models that help developers develop user interfaces efficiently.
In some embodiments, the template code may be hypertext markup language (HTML) template code, which is a markup language that includes a series of tags by which document formats on a network may be unified, such that distributed Internet resources are connected as a logical entity. HTML text is descriptive text composed of HTML commands that can specify words, graphics, animations, sounds, tables, links, etc. The template code of the present application is exemplified by HTML template code, and is not limited thereto in practice.
In one possible design, and referring to FIG. 2, there is provided an example of a specific method for obtaining a vue type file from a static module packaging tool Webpack of an application, the method may include the steps of:
1) Accessing Webpack; subscribing to a compiling completion event of the Webpack for the code file;
by way of example, the embodiments of the present application may be added as a plug-in to a plug-in queue of weback to establish a connection with weback; because the weback triggers an event (e.g., a compilation completion event of a code file) and then broadcasts a message to the plugins in the plugin queue, the plugins in the plugin queue can monitor the weback triggered event.
2) After receiving a compiling completion event sent by the Webpack, calling an interface provided by the Webpack to obtain a vue type file in the compiling completion code file;
illustratively, when the Webpack compilation is completed, a compilation completion event sent by the Webpack is received; detecting whether the Webpack triggers a compiling completion event (namely receiving a compiling completion message sent by the Webpack), if not, continuing monitoring; if yes, a method provided by Webpack is called to obtain a module list (namely, a module list in which all compiled files are stored), and files with suffix of vue in all compiled files are obtained.
3) Binary data in the type vue file is converted into a character string, and the type vue file with the character string type is obtained.
It can be appreciated that it is difficult for a technician to analyze and evaluate binary data in a vue type file, and therefore, the binary data is converted into a technician-readable string, which facilitates analyzing and locating problems in the code according to code quality evaluation rules, thereby improving efficiency and accuracy of code quality evaluation.
In the method, the embodiment of the application is accessed into the Webpack in the form of the plug-in, has strong portability and universality, and does not influence the compiling process of other files which are not compiled completely when the files which are compiled by the Webpack are acquired; and acquiring a compiled type vue file, converting binary data in the type vue file into character strings, and facilitating subsequent quality assessment for each type of code in at least one type of code contained in the type vue file, locating specific problems of the code, and improving efficiency and accuracy of code quality assessment.
S102, performing quality evaluation on each type of code according to the evaluation rule of each type of code in the at least one type of code.
Illustratively, the at least one type of code may include, but is not limited to, at least one type of HTML template code, data and logic code, and style code, and code quality evaluation rules are set for the HTML template code, the data and logic code, and the style code, respectively, and quality evaluation is performed on each type of code according to each type of code quality evaluation rules and quality evaluation results are recorded.
S103, outputting the quality evaluation record of each type of codes in the at least one type of codes.
Illustratively, the quality assessment record includes an unsatisfactory target code and a reason for the unsatisfactory target code.
The above is only one possible embodiment, and is not limited thereto in practice.
In the scheme, the vue type file which is compiled is obtained from the Webpack, the code quality evaluation rule is set for each type of code in at least one type of code contained in the vue type file, the quality evaluation is carried out on each type of code according to the quality evaluation rule of each type of code, and the evaluation result is recorded, so that specific problems of each type of code can be located, and the efficiency and accuracy of code quality evaluation are improved.
In one possible design, vue type files contain at least one string of template code; quality assessment may be performed for each type of code according to an assessment rule for each type of code in the at least one type of code.
Illustratively, storing at least one string of template codes into a preset list, wherein a row of the at least one string of template codes corresponds to a column of the preset list; detecting whether the total character number of each column of template codes in the list meets the preset character number requirement, and recording the template codes which do not meet the preset character number requirement.
Optionally, it may also detect whether each column of template codes in the list contains a component tag, where the component tag is used to indicate that the template code in the column where the component tag is located is an external lead-in code; detecting whether the component labels in each column of template codes meet the requirements of preset component labels or not according to each column of template codes with the component labels, and recording the template codes which do not meet the requirements of the preset component labels; the preset component tag requirement comprises that the name of the component tag is a name of a preset type and/or the attribute of an element in the component tag is a preset attribute.
For example, referring to fig. 3, for a specific example of quality assessment of HTML template code, the following steps may be included:
1) Detecting whether HTML template codes exist in vue type files, and if not, not executing HTML template code quality evaluation; and if the HTML template codes exist, storing the HTML template codes in the vue type file into a preset list, so that each column of HTML template codes can be conveniently read later, and the quality evaluation of each column of HTML template codes can be conveniently carried out.
2) Detecting whether the number of characters of each column of HTML template codes is within a preset number of characters (for example, 200 characters), and if the number of characters exceeds the preset number of characters, deducting a corresponding score (for example, deducting 0.1 score) from each exceeding one number of characters.
For example, if the number of characters of the first column of HTML template codes is 206 characters and the preset number of characters is 200 characters, the number of characters of the first column of HTML template codes exceeds 6 characters compared with the preset number of characters, and each more than one character is deducted by 0.1 point, namely 0.6 point is deducted; and recording the first column of HTML template codes (or the position of the first column of HTML template codes), the number of characters exceeded by the first column of HTML template codes and the deduction condition.
3) Detecting whether each column of template codes in a list contains a component tag or not, wherein the component tag is used for indicating that the template code of the column in which the component tag is located is an external introduction code;
illustratively, a component is an externally introduced code module and the component tag is used to indicate that the code is externally introduced code.
4) Detecting whether the name of a component tag of the column of HTML template codes is the same as the name of a component (namely, whether the name of the component tag is the same as the name of a module of the external lead-in code indicated by the component tag), and deducting a corresponding score (for example, deducting a score of 2) if the name of the component tag is different from the name of the module of the external lead-in code indicated by the component tag;
5) Detecting whether the elements in the component tags of the column of HTML template codes contain v-for attributes, if so, detecting whether key attributes are set in the elements in the component tags of the column of HTML template codes, and if not, deducting corresponding scores (for example, deducting 3 points); further, on the premise that the elements in the component tags of the column of HTML template codes contain v-for attributes, detecting whether v-if attributes are set, and deducting corresponding scores (for example, deducting 3 scores) if the v-if attributes are set;
6) Detecting whether elements in the component labels of the column of HTML template codes contain class attributes, if so, detecting whether class names of the class attributes are lowercase letters and are linked by underlining (such as test_style), and if not, deducting corresponding scores (such as 1 score);
7) Record each score.
Illustratively, the HTML template code with a discount in each column (or the position or the number of HTML template codes with a discount, etc.), the reason for the discount in each column, and the deducted score are stored in a statistical list.
The above is only one possible embodiment, and is not limited thereto in practice.
In the method, the quality evaluation is carried out on the HTML template codes according to the quality evaluation rule of the HTML template codes in the vue type file, the quality evaluation condition of each column of the HTML template codes in the list is recorded, the technical staff can conveniently locate the specific problem in the HTML template codes of the vue type file, and the efficiency and accuracy of code quality evaluation can be improved.
In one possible design, quality assessment of data and logic code may include: detecting whether at least one string of data and logic code contains an external lead-in code; if so, further detecting whether the external lead-in code is used when at least one string of data and logic codes is run, and recording the unused external lead-in code; and/or converting codes except the externally introduced codes in the data and the logic codes into at least one object type, detecting whether the attribute of each object type in the at least one object type is a preset attribute, and recording the codes corresponding to the object types which are not the preset attribute.
For example, referring to FIG. 4, there is illustrated the specific method steps for quality assessment of data and logic code:
1. Firstly, detecting whether data and logic codes exist in vue type files;
for example, if no data and logical code exists, no data and logical code quality assessment is performed for the vue type file; if the data and the logic codes exist, performing quality assessment according to quality assessment rules of the data and the logic codes;
2. acquiring a character string of data and a logic code;
3. removing annotation information in the data and the logic codes;
4. detecting whether the data and the logic codes contain external lead-in codes or not;
for example, FIG. 5 is an example of a string of data and logic code, and "import axios from" axios "and" import TestModule from "@/views/Testmoude. Vue" shown in FIG. 5 are external lead-in codes;
5. further, detecting whether the external lead-in code is used when the data and the logic code are run, and if the unused external lead-in code exists, deducting according to the number of the unused external codes (for example, 1 minute for the used external lead-in code appears);
6. converting the data and the logic code into object types to obtain the data and the logic objects;
illustratively, since the values of some of the attributes in the data and logic code are object types, converting the data and logic to object types facilitates subsequent detection of the respective attributes.
7. Detecting whether the data and the logic object contain tips attributes, if yes, detecting whether attribute values (such as 'id' shown in fig. 5) of all tips attributes are object types, and if not, deducting corresponding scores (such as 1 score);
8. detecting whether the data and the logic object contain registered component attributes, if yes, detecting whether components in the registered component attributes are all used, and if not, deducting corresponding scores according to the number of unused components (for example, deducting 1 score for an unused component appears);
9. a method for detecting whether the data and the logic object contain definition data, if the method contains definition data (such as a data () { } part shown in fig. 5), detecting whether the data is defined in the object returned by the data function, and if the method does not, deducting a corresponding score (such as a knot 5);
10. detecting whether the data and the logic object contain hook functions, if so (for example, the parts of "create () { }" and "moved () { }) shown in fig. 5), detecting whether the number of lines of the hook functions is smaller than a preset number of lines (for example, 200 lines), and if not, performing deduction according to the number of lines exceeded (for example, each line exceeded 0.2 minutes);
11. Detecting whether the data and the logic object contain a methods attribute, if yes, traversing each function in the methods attribute, detecting whether the number of lines of each function exceeds a preset number of lines (for example, 100 lines), and if yes, performing deduction according to the number of lines exceeded (for example, each line exceeded is 0.2 minutes); detecting whether annotation information exists in each function (such as "// method for closing dialog box and"// method for submitting data "shown in fig. 5), if not, deducting according to the number of functions without annotation information in the methods attribute (such as 1 score for a function without annotation information);
12. record each score.
Illustratively, the data and logical codes for which a discount exists (or the locations or amounts of the data and logical codes for which a discount exists), the reasons for which a discount exists and the logical codes for which a discount exists, and the deducted scores are stored in a statistical list.
The above is only one possible embodiment, and is not limited thereto in practice.
In the method, the quality evaluation is carried out on the data and the logic codes according to the quality evaluation rule of the data and the logic codes in the type vue file, the quality evaluation condition of the data and the logic codes is recorded, a technician can conveniently locate specific problems in the data and the logic codes of the type vue file, and the efficiency and the accuracy of the code quality evaluation can be improved.
In one possible design, a quality assessment of a style code includes: detecting whether each string of style codes in the at least one string of style codes contains a style tag, and recording the style codes which do not contain the style tag.
For example, referring to fig. 6, a specific example of method steps for quality assessment of style codes is shown:
1. detecting whether the type vue file contains the style codes or not, and if the type vue file does not contain the style codes, not carrying out quality evaluation on the style codes on the type vue file;
2. if the style code exists, detecting whether a scope attribute is contained in a label of the style code, and if the scope attribute is not contained, deducting a corresponding score (for example, deducting a score of 4);
3. quality assessment records of the style codes are collected.
Illustratively, the pattern code for which a discount exists (or the location or number of pattern codes for which a discount exists), the cause of the discount of the pattern code for which a discount exists, and the deducted score are stored in a statistical list.
The above is only one possible embodiment, and is not limited thereto in practice.
In the method, the quality evaluation of the style codes is carried out according to the quality evaluation rule of the style codes in the type vue file, and the quality evaluation condition of the style codes is recorded, so that a technician can conveniently locate specific problems in the style codes of the type vue file, and the efficiency and accuracy of the code quality evaluation can be improved.
In one possible design, the entire code may also be evaluated, for example: all codes in the vue type file (i.e., the whole codes) are evaluated according to the whole code evaluation rule; and outputting quality evaluation records of all codes.
Wherein evaluating the quality of the overall code according to the overall code evaluation rule includes performing at least one of:
detecting whether the name of the vue type file meets the preset name requirement, and if not, recording;
detecting whether the total number of the codes of the vue type file meets the preset number of the lines, and if not, recording;
and detecting whether the code structure of the vue type file accords with a preset code compiling sequence, and if not, recording.
For a specific example of quality assessment of the overall code (i.e., all codes of a vue type file) provided for embodiments of the present application, see fig. 7, the specific steps are as follows:
1. the name of the vue type file defined by the detection data and the logical code portion should be the same as the name of the vue type file actually obtained from weback, and if different, the corresponding score (e.g., 2 points deducted).
2. Detecting the total number of lines of codes of the vue type file, wherein the total number of lines of codes of the vue type file is within a preset number of lines (for example, within 500 lines), and if the preset number of lines is exceeded, deducting according to the number of the exceeded lines (for example, deducting 0.2 minutes every line is exceeded).
3. The code structure of vue type files is detected, the code structure should be arranged according to the preset code compiling sequence (for example, the code structure is arranged according to the sequence of HTML template codes, data and logic codes and style codes), and if the code structure does not accord with the preset code compiling sequence, the corresponding score (for example, 2 score deduction) is deducted.
4. Recording each deduction condition. The code with the deduction (or the position or the number of the code with the deduction), the reason for the deduction of the code with the deduction and the deduction are stored in a statistical list.
The above is only one possible embodiment, and is not limited thereto in practice.
In the method, all codes are subjected to quality evaluation according to the quality evaluation rule of the whole codes of all codes in the vue type file, and the quality evaluation condition of the whole codes is recorded, so that a technician can conveniently locate specific problems in the whole codes of the vue type file, and the efficiency and accuracy of code quality evaluation can be improved.
In one possible design, an embodiment of the present application outputs a code quality assessment record, which may include: transmitting a code quality assessment completion event to the weback; outputting the quality evaluation records of all codes and/or the quality evaluation records of each type of codes in at least one type of codes.
For a specific example of outputting a code quality assessment record, see fig. 8 for an illustration:
1. monitoring the detection situation of a quality detection module (i.e. the processing module for performing quality assessment on codes is provided in the embodiment);
2. judging whether the detection of the quality detection module is finished or not;
for example, if the quality detection module detects that the quality is not complete (i.e., the quality evaluation of the vue type file code is not complete), continuing to monitor the detection condition of the quality detection module; if the quality detection module detects that the quality is finished (namely, the quality evaluation of the vue type file code is finished), a detection result is obtained.
3. Obtaining detection results of all modules;
illustratively, the quality evaluation results of all codes (i.e., the whole codes) of the type vue file and the quality evaluation results of each type of code in at least one type of code contained in the type vue file are obtained;
for example, obtain quality assessment records for all code, HTML template code, data and logic code, and style code; calculating the quality evaluation scores of all codes and the quality evaluation scores of various codes; wherein at least one of the quality assessment record and the quality assessment score for all codes constitutes a quality assessment result for all codes; at least one of the quality evaluation records and the quality evaluation scores of the various codes forms a quality evaluation result of the various codes;
4. Sequencing the quality evaluation scores of all codes and the quality evaluation scores of various codes according to the sequence from high to low;
5. outputting detection results of all the modules;
illustratively, at least one of a quality assessment record and a score for all codes and classes of codes is output in the order of step 4.
In the method, after the code quality detection is finished, at least one of the quality evaluation records and the scores of all codes and various codes is output, so that a technician can conveniently locate problems in vue type files, compare the quality evaluation results of all codes and various codes or inquire the quality evaluation results of various codes to be checked, and the efficiency and the accuracy of code quality evaluation are improved.
The above is only one possible embodiment, and is not limited thereto in practice.
In one possible design, referring to FIG. 9, an example of calculating various types of code scores is provided, with the following specific steps:
1. collecting the deduction condition of each type of code in at least one type of code contained in the vue type file;
2. adding the deductions of each class of codes to obtain a deduction sum;
3. subtracting the deduction sum of each class of codes from a preset full score (for example, 100 scores) to obtain a quality evaluation score of each class of codes;
For example, if the quality evaluation score is less than 0, the quality evaluation score less than 0 is set to 0.
4. Information of each type of code (such as name, position and the like of each type of code), each deduction condition of each type of code (such as deduction reason, specific deduction score and the like) and quality evaluation score of each type of code are stored in a preset cache list.
The above is only one possible embodiment, and is not limited thereto in practice.
In the method, the quality problems of various codes are quantized in a fractional form, so that the quality of various codes can be intuitively judged, and technicians can conveniently and rapidly locate the codes with problems and subsequently carry out key investigation and solution on the quality problems of various codes.
In one possible design, referring to FIG. 10, an example of a vue type file code is provided in an embodiment of the present application. Referring to fig. 11, an example of HTML template code, data and logic code, and style code may be obtained based on the structure of the type vue file shown in fig. 10 for the embodiment of the present application.
Illustratively, the HTML template code is the code contained between < template > … </template > shown in FIG. 10, i.e., the portion of code contains HTML template related functionality; the data and logic code is the code contained between < script > … … </script > shown in figure 10, i.e. the partial code contains the definition of data and the processing related functions of logic; the style codes are codes included between < style > … … </style > shown in fig. 10, i.e., the partial codes include style-related functions.
The above is only one possible embodiment, and is not limited thereto in practice.
It will be appreciated that the above-described embodiments are examples and may be implemented separately or in combination with each other.
The following is a specific example of a code quality evaluation of a vue type file provided in the present application, referring to fig. 12, and specific steps are as follows:
1. accessing Webpack, and subscribing compiling completion events of the Webpack on the code file;
for example, the embodiment of the application may be added as a plug-in to a plug-in queue of weback, and a connection is established with weback; a compile completion event for a code file is received from a Webpack platform.
2. Calling an interface provided by Webpack to acquire vue type files;
for example, when a compile completion event is received, the interface provided by weback is invoked to obtain all compiled code files, and vue type files are screened out from all code files.
3. Converting the vue type file into a character string;
it will be appreciated that the content of the type vue file obtained from weback is binary data, which is converted into a string, resulting in a type vue file of the string type.
4. Analyzing each type of code in at least one type of code contained in the vue type file;
For example, the vue type file may include at least one of HTML template code, data and logic code, and style code, and the content of each type of code is obtained based on the identity of each type of code, e.g., HTML template code is included between < template > … </template >, data and logic code is included between < script > … … </script >, and style code is included between < style > … … </style >.
5. Evaluating the overall code quality of all codes in the vue type file;
for example, all codes in the vue type file are evaluated according to the overall code evaluation rule, and the quality evaluation results of all codes are recorded;
for example, if the total number of preset code lines is 500 lines, all code lines in the vue type file are 550 lines, the total number of the code lines exceeds 50 lines, and the total number of the code lines is deducted by 0.2 point per line exceeding, and the total number of the code lines is deducted by 10 points, so that the quality evaluation record is stored in the preset cache list.
6. Evaluating the quality of the HTML template code in the vue type file;
for example, detect the existence of HTML template code in vue type file, if exist, obtain HTML template code; evaluating the quality of the HTML template codes according to the HTML template code quality evaluation rule, and recording the quality evaluation result of the HTML template codes;
For example, if the element in the component tag of the first column of HTML template code contains a v-for attribute, but the key attribute is not set in the element in the component tag of the first column of HTML template code, then 3 points are deducted; further, on the premise that the elements in the component tag of the first column of HTML template codes contain v-for attributes, setting v-if attributes, and deducting 3 points; and storing the quality evaluation record of the HTML template code into a preset cache list.
7. The quality of the data and logical code in the vue type file is evaluated;
for example, detect the presence of data and logical code in a vue type file, if so, acquire the data and logical code; evaluating the quality of the data and the logic codes according to the quality evaluation rules of the data and the logic codes, and recording the quality evaluation results of the data and the logic codes;
for example, three external lead-in codes are led into the data and the logic codes, wherein one external lead-in code is not used when the data and the logic codes are operated, and 1 point is deducted according to the fact that one external lead-in code which is used is deducted by 1 point; the data and the logic object contain methods attribute, but four functions in the methods attribute have no annotation information, and deduct 4 points according to the fact that a function with no annotation information is 1 point; and storing the quality evaluation records of the data and the logic codes into a preset cache list.
8. Evaluating the quality of the style code in the vue type file;
for example, detect the presence of a style code in a vue type file, if so, obtain the style code; evaluating the quality of the pattern codes according to the pattern code quality evaluation rule, and recording the quality evaluation result of the pattern;
for example, if the scope attribute is not included in the tag < style > of the style code, the score 4 is deducted.
9. Calculating quality evaluation scores of all codes and various codes;
for example, referring to the example of steps 5-8 above, the overall quality assessment score for all codes from 100 points minus the points is 90 points, the quality assessment score for the HTML template code is 94 points, the quality assessment score for the data and logic code amounts is 95 points, and the quality assessment score for the style code is 96 points.
10. And outputting the overall evaluation condition of all codes and the quality evaluation condition of each type of codes.
For example, referring to the example of steps 5-9 above, all quality assessment scores are ranked from high to low, and the overall assessment of all codes and the quality assessment of each class of codes are output according to the ranking as follows: style code, label < style > does not contain scope attribute button 4 score, score 96 score; data and logic codes, one external lead-in code is not used for deducting 1 score when the data and logic codes are operated, and four functions in the methods attribute are not annotated with information deduction 4 scores, and the score is 95 scores; the elements in the component tags of the first column of HTML template codes contain v-for attributes, but key attribute buttons are not set for 3 minutes in the elements in the component tags of the first column of HTML template codes; the component tag of the first column of HTML template codes is provided with a v-if attribute button of 3 points, and the score is 94 points; and the overall codes are divided into 90 points when the number of lines of all codes exceeds 50 lines by 10 points.
The above is only one possible embodiment, and is not limited thereto in practice.
The method provided by the embodiment of the present application is described above, and the device provided by the embodiment of the present application is described below.
Based on the same technical concept, referring to fig. 13, a code quality evaluation apparatus is provided for an embodiment of the present application, where the apparatus includes a module/unit/means for performing a method performed by a source database server or a target database server in the above-described method embodiment. The module/unit/means may be implemented by software, or by hardware executing corresponding software.
Illustratively, the apparatus 1300 may include:
an obtaining module 1301, configured to obtain a vue type file from a static module packaging tool weback of the application program, where the vue type file includes at least one type of code, where the at least one type of code includes one or more of template code, data, logic code, and style code;
a processing module 1302, configured to perform quality evaluation on each type of code according to an evaluation rule of each type of code in at least one type of code;
and the output module 1303 is used for outputting the quality evaluation record of each type of code in the at least one type of code.
It should be understood that all relevant contents of each step involved in the above method embodiments may be cited to the functional descriptions of the corresponding functional modules, and are not described herein.
As one possible product form of the above apparatus, referring to fig. 14, an embodiment of the present application further provides an electronic device 1400, including:
at least one processor 1401; and a communication interface 1403 communicatively coupled to the at least one processor 1401; the at least one processor 1401, by executing instructions stored in memory 1402, causes the electronic device 1400 to perform the method steps performed by the watch board in the method embodiments described above, through the communication interface 1403.
Optionally, the memory 1402 is external to the electronic device 1400.
Optionally, the electronic device 1400 includes the memory 1402, the memory 1402 being coupled to the at least one processor 1401, the memory 1402 having instructions executable by the at least one processor 1401. Fig. 14 shows, in dashed lines, that the memory 1402 is optional for the electronic device 1400.
Wherein the at least one processor 1401 and the memory 1402 may be coupled through an interface circuit or may be integrated together, without limitation.
The specific connection medium between the at least one processor 1401, the memory 1302, and the communication interface 1403 is not limited in the embodiments of the present application. In the embodiment of the present application, at least one processor 1401, a memory 1402 and a communication link 1403 are connected through a bus 1404 in fig. 14, where the bus is indicated by a thick line in fig. 14, and the connection manner between other components is merely illustrative and not limited thereto. The bus portion may be an address bus, a data bus, a control bus, etc. For ease of illustration, fig. 14 is shown with only one bold line, but does not represent only one bus or one type of bus.
It should be understood that the processors mentioned in the embodiments of the present application may be implemented by hardware or may be implemented by software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented in software, the processor may be a general purpose processor, implemented by reading software code stored in a memory.
By way of example, the processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, as well as a microprocessor or any conventional processor.
It should be understood that the memories mentioned in the embodiments of the present application may be volatile memories or nonvolatile memories, or may include both volatile memories and nonvolatile memories. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM) which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data rate Synchronous DRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
It should be noted that when the processor is a general purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, the memory (storage module) may be integrated into the processor.
It should be noted that the memory described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
As another possible product form, the present application also provides a computer-readable storage medium for storing instructions that, when executed, cause a computer to perform the method steps performed by any of the apparatus of the method embodiments described above.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (14)

1. A code quality assessment method, comprising:
acquiring a vue type file from a static module packaging tool Webpack of an application program, wherein the vue type file contains at least one type of code comprising one or more of template code, data, logic code and style code;
performing quality evaluation on each type of code according to an evaluation rule of each type of code in the at least one type of code;
And outputting the quality evaluation record of each type of codes in the at least one type of codes.
2. The method of claim 1, wherein the quality assessment record includes an unsatisfactory target code and a reason for the target code being unsatisfactory.
3. The method of claim 1 or 2, wherein the vue type file contains at least one string of template code; the performing quality evaluation on each type of code according to the evaluation rule of each type of code in the at least one type of code includes:
storing the at least one string of template codes into a preset list, wherein one row of the at least one string of template codes corresponds to one column of the preset list;
detecting whether the total character number of each column of template codes in the list meets the preset character number requirement, and recording template codes which do not meet the preset character number requirement.
4. The method of claim 1 or 2, wherein the method further comprises:
detecting whether each column of template codes in the list contains a component tag or not, wherein the component tag is used for indicating that the template code of the column in which the component tag is located is an external introduction code;
Detecting whether the component labels in each column of the template codes meet the requirements of preset component labels or not according to each column of the template codes with the component labels, and recording the template codes which do not meet the preset component labels; the preset component tag requirement comprises that the name of the component tag is a name of a preset type and/or the attribute of an element in the component tag is a preset attribute.
5. The method of claim 1 or 2, wherein the vue type file contains at least one string of data and logical code; the performing quality evaluation on each type of code according to the evaluation rule of each type of code in the at least one type of code includes:
detecting whether the at least one string of data and logic code contains an external lead-in code; if so, further detecting whether the external lead-in code is used when the at least one string of data and the logic code is run, and recording the external lead-in code which is not used; and/or the number of the groups of groups,
and converting codes except for externally introduced codes in the data and logic codes into at least one object type, detecting whether the attribute of each object type in the at least one object type is a preset attribute, and recording codes corresponding to the object types which are not the preset attribute.
6. The method of claim 1 or 2, wherein the vue type file contains at least one string of style codes; the performing quality evaluation on each type of code according to the evaluation rule of each type of code in the at least one type of code includes:
detecting whether each string of style codes in the at least one string of style codes contains a style tag, and recording the style codes which do not contain the style tag.
7. The method of claim 1, wherein the method further comprises:
evaluating all codes in the vue type file according to the overall code evaluation rule;
and outputting the quality evaluation records of all codes.
8. The method of claim 7, wherein the evaluating the quality of the overall code according to overall code evaluation rules comprises performing at least one of:
detecting whether the name of the vue type file meets the preset name requirement, and if not, recording;
detecting whether the total number of the codes of the vue type file meets the preset number of the lines, and if not, recording;
and detecting whether the code structure of the vue type file accords with a preset code compiling sequence, and if not, recording.
9. The method of claim 1, wherein the obtaining vue type files from the static module packaging tool weback of the application comprises:
subscribing compiling completion events of the Webpack aiming at the code file;
receiving a compiling completion event sent by the Webpack, and calling an interface provided by the Webpack to obtain a vue type file in a compiling completion code file;
and converting binary data in the type vue file into a character string to obtain a type vue file of the character string type.
10. The method of claim 7, wherein outputting the result of the code quality assessment comprises:
and sending a code quality evaluation completion event to the Webpack, and outputting the quality evaluation records of all codes and the quality evaluation records of each type of codes in the at least one type of codes.
11. A code quality evaluation apparatus, comprising:
the system comprises an acquisition module, a model generation module and a model generation module, wherein the acquisition module is used for acquiring a vue type file from a static module packaging tool Webpack of an application program, wherein the vue type file contains at least one type of codes, and the at least one type of codes comprises one or more of template codes, data, logic codes and style codes;
The processing module is used for executing quality evaluation on each type of codes according to the evaluation rule of each type of codes in the at least one type of codes;
and the output module is used for outputting the quality evaluation record of each type of codes in the at least one type of codes.
12. An electronic device comprising at least one processor for implementing the method according to any of claims 1-9 when executing a computer program stored in a memory.
13. A computer readable storage medium for storing instructions that, when executed, cause the method of any one of claims 1-10 to be implemented.
14. A computer program product, the computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of any of the preceding claims 1-9.
CN202311268585.0A 2023-09-27 2023-09-27 Code quality assessment method and device Pending CN117312156A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311268585.0A CN117312156A (en) 2023-09-27 2023-09-27 Code quality assessment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311268585.0A CN117312156A (en) 2023-09-27 2023-09-27 Code quality assessment method and device

Publications (1)

Publication Number Publication Date
CN117312156A true CN117312156A (en) 2023-12-29

Family

ID=89273292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311268585.0A Pending CN117312156A (en) 2023-09-27 2023-09-27 Code quality assessment method and device

Country Status (1)

Country Link
CN (1) CN117312156A (en)

Similar Documents

Publication Publication Date Title
US10474455B2 (en) Automating identification of code snippets for library suggestion models
US20200293433A1 (en) Automating Identification of Test Cases for Library Suggestion Models
US10613971B1 (en) Autonomous testing of web-based applications
US10684849B2 (en) Automating generation of library suggestion engine models
US8132156B2 (en) Methods and systems for testing tool with comparative testing
US20170132119A1 (en) Method and device for retrieving test case based on code coverage
US8745595B2 (en) Information processing apparatus and method of acquiring trace log
US9152731B2 (en) Detecting a broken point in a web application automatic test case
US20080127103A1 (en) Dynamic deneration and implementation of globalization verification testing for user interface controls
US5862382A (en) Program analysis system and program analysis method
CN110018954B (en) Code quality detection method, device and equipment, and code detection quality evaluation method, device and equipment
CN110908915B (en) Test coverage rate display method and device and computer system
CN104239219A (en) Software defect positioning technology on-line evaluating and experimenting platform and method based on coverage
KR101979329B1 (en) Method and apparatus for tracking security vulnerable input data of executable binaries thereof
CN115269444B (en) Code static detection method and device and server
CN110286912B (en) Code detection method and device and electronic equipment
Ardito et al. rust-code-analysis: A Rust library to analyze and extract maintainability information from source codes
CN112925524A (en) Method and device for detecting unsafe direct memory access in driver
CN116991751B (en) Code testing method and device, electronic equipment and storage medium
CN111767213B (en) Database check point testing method and device, electronic equipment and storage medium
JP2013218492A (en) Software test automatic evaluation device and method
Geiger et al. Automatic Standard Compliance Assessment of BPMN 2.0 Process Models.
CN112084108A (en) Test script generation method and device and related components
Frick Understanding software changes: Extracting, classifying, and presenting fine-grained source code changes
CN115543832A (en) Software code standard detection method, system, equipment 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