A front-end code automatic verification method based on centralized management mode

By using Prettier+ESLint or TSLint checking rules in the code centralized management mode, automatic verification and repair of front-end code is realized, which solves the problem of difficulty in identifying and repairing code errors, improves the efficiency and standardization of code review, and is applicable For SVN and GIT management tools.

CN113918162BActive Publication Date: 2024-10-18CHENGDU DBAPP SECURITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111152243.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-29
Publication Date
2024-10-18
Estimated Expiration
2041-09-29

AI Technical Summary

Technical Problem

In a centralized code management scenario, hook scripts cannot be configured on the SVN server to trigger automatic verification, and the code error recognition rate is low and repairing is difficult. Errors cannot be detected and repaired in a timely manner, resulting in a decrease in the submission pass rate.

Method used

Adopt an automated verification method of front-end code based on a centralized management model, and use Prettier+ESLint or TSLint inspection rules to realize automated verification and repair of front-end code. It supports two source code management tools, SVN and GIT, and automated code inspection rules can Flexible configuration, comprehensive coverage, suitable for any front-end project.

Benefits of technology

It effectively improves the readability and robustness of the code, reduces maintenance costs, improves code review efficiency and repair accuracy, ensures code standardization and security, and is suitable for a variety of scenarios and projects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113918162B_ABST
    Figure CN113918162B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of computer automated verification, and discloses a front-end code automated verification method based on a centralized management mode, comprising: presetting automated code checking rules to be activated; configuring the automated code checking rules to be activated into the front-end code project; the user selects the corresponding automated code checking rules according to the hosting mode; selects the type of automated code checking rules; activates the automated code checking rules corresponding to the hosting mode and type; edits the front-end code in the front-end code project to be verified, and performs a first automated code verification and a first code repair on the front-end code according to the activated automated code checking rules; continues to check the front-end code project to be verified according to the automated code checking rules, performs a corresponding second automated code verification and a second automated code repair on the front-end code, determines whether the output verification result is correct, and stores the front-end code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer automated verification technology, and specifically, to a front-end code automated verification method based on a centralized management mode, which is used to support automated code inspection and automated repair in a centralized code management scenario, thereby improving inspection efficiency and repair accuracy. Background Art

[0002] CR (Code Review) is something that every company and every product team must do, especially as a security company, code review is particularly important. CR effectively standardizes the front-end code writing style, which can effectively reduce the cost of reading the code and code errors, and also greatly improves the readability and robustness of the code, reducing the cost of later maintenance. Currently, there are several common CR methods: In the project mode where the front-end and back-end are not separated, most of them adopt the manual CR mode, that is, by using certain plug-ins / systems to automatically obtain the code submission record from the code version library, and then automatically create the desired CR task, and automatically assign the CD task to the corresponding code reviewer according to the custom rules. It also supports manual assignment, such as the common Redmine (web-based project management software) project management tool. This manual CR method has its advantages, but the existing problems are also very obvious, as follows: the review efficiency is very low; the code error recognition rate is very low; the inspection coverage rate is low, and the credibility of the conclusion is low. When the project time is very tight, most of them are just a cursory inspection, and the conclusion becomes unreliable, and the real purpose of CR is not achieved; this method requires the code to be uploaded to the library first, and the wrong code is still uploaded successfully, and the advance check before the code is uploaded to the library is not done; in the project mode with front-end and back-end separation, some still use the manual CR mode, but there are also many tools that can help us automatically do these CRs and solve some problems faced by most manual CRs, such as: low efficiency, inaccurate error recognition coverage, etc. There are currently two main ways to manage project source code: SVN and GIT. Both of these source code management tools provide some verification hooks to ensure that the corresponding inspection rules are triggered before the code is committed to the repository to automatically check the code format and coding errors, improve code quality, and prevent non-standard code from being submitted to the code repository. SVN is a centralized version control system, while GIT is a distributed version control system. Both have their own advantages and disadvantages, so both are still very active in the market, especially for some historical online projects. Most project-related documents and codes are hosted using SVN. After all, SVN is easy to manage, and the operation mode of centralized servers can better ensure security. In particular, SVN is widely used in some traditional security companies. In this context, we need to use the hooks provided by SVN to perform automatic code checking, which will cause the following problems:

[0003] (1) In the scenario of centralized code management, the configuration permissions of the code repository (server) are usually very high, and generally only administrators have the configuration permissions of the relevant servers. Although we can configure some commonly used hooks in the hooks folder on the server, such as pre-commit.bat, post-commit.bat, etc., for automatic checks before code submission, this method becomes unavailable because we cannot obtain administrator permissions.

[0004] (2) After all, most of the company's projects are stored on the centrally managed server, so most of the above (1) is not feasible. Transfer to the client settings, you need to fill in the Hook type and related script path and command line in the Hook Script. The configuration check script is cumbersome and it is impossible to ensure that every member of the project team has configured hooks. Of course, it can also be achieved by writing a batch processing script to modify the registry information, but there is still the problem of not being able to unify user configuration.

[0005] (3) Most programmers prefer to operate directly through the command line. When they submit code without using the client mentioned in (2) above, the corresponding client hook verification cannot be triggered.

[0006] (4) Under the premise that (1) or (2) above can be successfully configured, the number of historical project files is huge. Applying the rules to the entire project at one time may cause a large number of files to trigger syntax errors, making the project operation uncontrollable. In addition, the maintainer is not familiar with the historical code, making the repair difficulty and cost very high.

[0007] (5) Under the premise that (1) or (2) above can be successfully configured, although the corresponding code verification rules are configured in the project, the code submission cannot trigger the rule verification in time, and the developer cannot perceive the error in time, let alone help us automatically fix the code error; only when an error occurs in the submitted code can the source of the error be realized, resulting in a decrease in the pass rate of the submitted code.

[0008] Therefore, there is an urgent need for a technical solution to make some improvements to these special scenarios to improve our inspection efficiency and ensure the correctness, effectiveness and standardization of the inspection.

[0009] Glossary

[0010] SVN: subversion, an open source centralized version control system;

[0011] GIT: GlobalInfoTechcompany, an open source distributed version control system;

[0012] CR:CodeReview, code review / code walkthrough;

[0013] Redmine: Redmine is a web-based project management software. Summary of the invention

[0014] The purpose of the present invention is to provide a front-end code automatic verification method based on a centralized management mode, to realize the functions of supporting automatic code inspection and automatic repair in the code centralized management scenario, to improve the inspection efficiency and the repair accuracy, and to have the effects of comprehensive coverage, flexible settings and compatibility with various product projects.

[0015] The present invention is implemented by the following technical solution: a front-end code automatic verification method based on a centralized management mode, comprising the following steps:

[0016] Step S1. Preset the automated code checking rules to be activated;

[0017] Step S2. Enter the front-end code project to be verified, and configure the automated code checking rules to be activated into the front-end code project;

[0018] Step S3. The user manually selects whether the code hosting method is GIT or SVN, and selects the corresponding automated code checking rules according to the hosting method;

[0019] Step S4. Select the type of automated code checking rules, and determine whether it is necessary to set corresponding checking rules by yourself according to the type. If yes, select the customized method and generate corresponding automated code checking rules according to the self-set checking rules. If no, start the default setting checking rules and generate default automated code checking rules.

[0020] Step S5. Activate the automated code checking rules corresponding to the hosting mode and type;

[0021] Step S6. Edit the front-end code in the front-end code project to be verified, and perform the first automated code verification on the front-end code according to the activated automated code verification rule to determine whether the front-end code has an error. If so, perform the first code repair on the error code after saving the front-end code, submit the repaired code to the code repository, select the number of repaired code files, and then continue to start the automated code verification rule; if not, the automated code verification rule cannot be started;

[0022] Step S7. Continue to check the front-end code project to be checked according to the automated code checking rules, perform a corresponding second automated code check and a second automated code repair on the front-end code, and determine whether the output verification result is correct. If so, put the front-end code to be checked into the database; if not, return to step S5.

[0023] In this technical solution, first of all, the problem of how to trigger the automatic verification of the code when the hook script cannot be configured on the SVN server is solved. Secondly, it is not restricted by the project. The automatic code checking rules can be flexibly configured with the project and are not restricted by the administrator. Finally, it can also perform automatic inspection on the front-end code, providing a solution for the scenario where the verification hook cannot be configured through normal channels (for example: no permission configuration, cannot be configured uniformly).

[0024] This technical solution proposes a method and device for automatic verification of front-end code based on a centralized code management mode, using +Prettier+ESLint or TSLint inspection rules, to achieve automatic inspection and automatic repair of front-end code before storage. This method effectively standardizes the front-end code writing style, which can effectively reduce the code reading cost and code errors, while also greatly improving the readability and robustness of the code, and reducing the subsequent maintenance costs. This technical solution can be used for automatic code verification of any front-end project, regardless of whether the source code management tool used is SVN or GIT. This technical solution is proposed based on a centralized management scenario, but is not only compatible with this scenario. It does not limit the use of verification rule content and specific rule configuration. It is simple to install and flexible to configure, which greatly improves CR efficiency, accuracy, and standardization.

[0025] In order to better implement the present invention, further, the automated code checking rules in step S1 include SVN code checking rules and GIT code checking rules.

[0026] In this technical solution, the current source code management tools, whether GIT or SVN, provide corresponding client hooks and server hooks. Users can define hook scripts by themselves. This method gives users greater flexibility, but its customized scripts can only be configured on the client or server side. Generally, only administrators have the configuration authority of the relevant servers. Users configure hooks through the client, and the hook check can only be triggered when the client submits the code, otherwise the hook will not take effect; if there are many members in the project team, all members participating in the project need to uniformly configure the script and submit the code using the client method to ensure code standardization and uniformity. This method has relatively high limitations. In this technical solution, the problem of users customizing various hook script solutions can be solved by setting SVN code checking rules and GIT code checking rules.

[0027] In order to better implement the present invention, further, step S3 includes:

[0028] When the user does not select the code hosting method, enter the management of the front-end code default configuration and do not select the automated code checking rules.

[0029] In this technical solution, if the code hosting method is not selected, the default configuration will be used. This default configuration can be GIT configuration. The automatic code checking rules are not selected. This means that our usage method is still not to use the automatic code checking rules, but to find hook scripts provided by others on the Internet or customize hook scripts to cooperate with the code automatic checking plug-in provided by IDE; first of all, there may be security issues when looking for hook scripts provided by others on the Internet. If the open source hook scripts on the Internet are used by criminals, new security issues may be introduced. The content implemented by the script may not be applicable to our own projects, and there are certain limitations. At the same time, there are still the same defects of user-defined hook script solutions. Secondly, the default global file is effective when the custom hook script is used with the code automatic checking plug-in provided by IDE. If you want to standardize the front-end code for historical projects, it will cause full screen errors, resulting in uncontrollable error ranges, and it will also increase the workload of testing. After an error occurs, you need to manually execute the FIX command on the specified file. Therefore, if we do not choose our automatic code checking rules, we cannot ensure the correctness, effectiveness, standardization and efficiency of the inspection.

[0030] In order to better implement the present invention, further, step S3 also includes:

[0031] Activate and start the corresponding SVN code check rules or GIT code check rules according to the hosting method.

[0032] In this technical solution, different inspection rules are set for different methods, which can check and support multiple modes, multiple scenarios, comprehensive coverage, flexible settings and compatibility with various product projects.

[0033] In order to better implement the present invention, further, the SVN code checking rules include:

[0034] When receiving the SVN code selected by the user through the SVN request command, the status verification rule of the current SVN code file is triggered;

[0035] According to the status verification rules of SVN code files, SVN code files in the new and modified states are added to the SVN to-be-verified area.

[0036] In this technical solution, for SVN version library verification, when receiving the user's SVN commit request command, the current file status verification will be triggered, and the files in the new and modified states will be added to the area to be verified.

[0037] In order to better implement the present invention, further, the GIT code checking rule includes: when receiving the GIT code selected by the user through the GIT request command, triggering the status checking rule of the current GIT code file;

[0038] According to the status verification rules of GIT code files, GIT code files in the three states of added, modified and temporarily stored are added to the GIT waiting for verification area.

[0039] In this technical solution, for GIT version library verification, when receiving the user's GIT commit request command, it will trigger the status verification of the current file, and add the files in the three states of added, modified, and temporarily stored to the waiting verification area. This method can control the scope of code impact and is very friendly to historical code maintenance.

[0040] In order to better implement the present invention, further, the first code repair in step S6 includes:

[0041] Each time the front-end code is saved, the error code will be automatically corrected through the preset key commands.

[0042] In this technical solution, each time you press the Ctrl+S key command to save the code, the first automatic correction of the error code will be automatically performed, the error will be corrected in advance, and the success rate of subsequent code storage will be increased.

[0043] In order to better implement the present invention, further, step S7 includes:

[0044] Add the code files to the to-be-verified area of ​​the corresponding code hosting method, and select all the code files in the to-be-verified area through the all command;

[0045] Submit the corresponding request information, perform a corresponding second automatic code verification and a second automatic code repair on the submitted request information according to the automatic code checking rule, and output the verification result.

[0046] In this technical solution, a list of files in the area to be verified is presented to the user for selection. The command -all can be used to select all files in the area to be verified. After selecting the files, the corresponding commit request information is submitted. The program will automatically perform a standard verification of the commit request information to ensure the standardization and uniformity of the submitted information. After the submitted information passes the verification, the corresponding second automatic code verification and second automatic code repair will be performed to ensure the correctness and standardization of the code.

[0047] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0048] (1) The automated verification method provided by the present invention supports multiple modes and scenarios, and has comprehensive coverage, flexible settings, and compatibility with various product projects;

[0049] (2) The automated verification method provided by the present invention supports automated code inspection and automated repair in the scenario of centralized code management, thereby improving inspection efficiency and repair accuracy;

[0050] (3) The automated verification method provided by the present invention makes up for the deficiencies of common client or server configuration scripts. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The present invention is further described in conjunction with the following drawings and embodiments, and all the concepts and innovations of the present invention should be regarded as the disclosed contents and the protection scope of the present invention.

[0052] Figure 1 The present invention discloses a flow chart of a front-end code automatic verification method based on a centralized management mode. DETAILED DESCRIPTION

[0053] Embodiment 1:

[0054] This embodiment is based on a front-end code automatic verification method under a centralized management mode, such as Figure 1 As shown,

[0055] In this embodiment, through the above steps, firstly, the problem of how to trigger the automatic verification of the code when the hook script cannot be configured on the SVN server is solved; secondly, it is not restricted by the project, and the automatic code checking rules can be flexibly configured with the project without being restricted by the administrator; finally, the front-end code can be automatically checked, providing a solution for the scenario where the verification hook cannot be configured through normal channels (for example: no permission configuration, cannot be configured uniformly).

[0056] This embodiment proposes a method and device for automatic verification of front-end code based on the centralized code management mode, using +Prettier+ESLint or TSLint inspection rules, to realize automatic inspection and automatic repair of front-end code before storage. This method effectively standardizes the front-end code writing style, can effectively reduce the code reading cost and code errors, and also greatly improves the readability and robustness of the code, and reduces the subsequent maintenance cost. This embodiment can be used for automatic code verification of any front-end project, not limited to whether the source code management tool used is SVN or GIT (this technical solution is proposed based on the centralized management scenario, not only compatible with this scenario), not limited to the use of verification rule content and specific rule configuration, simple installation, flexible configuration, greatly improves CR efficiency, accuracy and standardization, etc.

[0057] The entire verification process of this embodiment will conduct a submission information check, so that the project submission has a unified specification, and two code checks and automatic repairs. The device supports code management library selection when installed, and currently supports GIT and SVN, which are commonly used on the market. The front-end code automation verification method in this embodiment supports the selection of code inspection rule types, and currently supports the most commonly used ESLint on the market, and the eliminated TSLint method is also supported. The preset automated code inspection rules of this embodiment have built-in inspection rules commonly used by ESLint and TSLint, and support viewing the built-in inspection rules of the device through SHOU RULE. When configuring the automated code inspection rules, developers can set their own inspection rules according to project needs. If the default inspection rules do not meet the needs, you can select the custom customization method by setting the corresponding rule file (.eslintrc.js or tslint.json file project path) path. In the custom installation mode, if the project needs to change the inspection rules, you only need to modify the corresponding rule file in the project, which is convenient and flexible.

[0058] The first automated code check in this embodiment is to trigger the configured rules in the project in real time during the code writing process to perform the first automated code verification, identify errors in advance, and improve the success rate of subsequent code storage.

[0059] The first automatic repair in this embodiment is that each time you press Ctrl+S to save the code, it will automatically perform the first automatic correction of the error code, correct the error in advance, and improve the success rate of subsequent code storage.

[0060] Embodiment 2:

[0061] This embodiment is further optimized on the basis of embodiment 1. In this embodiment, the current source code management tools, whether GIT or SVN, provide corresponding client hooks and server hooks. Users can define hook scripts by themselves. This method gives users greater flexibility, but it (customized scripts) can only be configured on the client or server side. Generally, only administrators have the configuration authority of the relevant server. Users configure hooks through the client, and the hook verification can only be triggered when the client submits the code, otherwise the hook will not take effect; if there are many members in the project team, all members participating in the project need to uniformly configure the script and submit the code using the client method to ensure code standardization and uniformity. This method has relatively high limitations. In this embodiment, by setting SVN code inspection rules and GIT code inspection rules, the problem of users customizing various hook script solutions can be solved. In addition, the automated code inspection rules configured in this embodiment also support two methods: NPM installation and client configuration in script mode. There is no restriction on the use method. The rules for setting corresponding methods are also based on the principles of automated code inspection and automatic repair.

[0062] The other parts of this embodiment are the same as those of Embodiment 1, and thus will not be described in detail.

[0063] Embodiment 3:

[0064] This embodiment is further optimized on the basis of embodiment 1. This embodiment does not use the code hosting method, and will go to the default configuration to enter the management of the default configuration of the front-end code. This default configuration can be GIT configuration. The automatic code inspection rule is not selected. This makes our use method still not through the automatic code inspection rule, but to find the hook script provided by others on the Internet or customize the hook script to cooperate with the code automatic inspection plug-in provided by IDE. First of all, there may be security issues when searching for hook scripts provided by others on the Internet. If the open source hook scripts on the Internet are used by criminals, new security issues may be introduced. The content implemented by the script may not be applicable to our own projects, and there are certain limitations. At the same time, there are still the same defects of user-defined hook script solutions. Secondly, the default global file is effective when the custom hook script is used in conjunction with the code automatic inspection plug-in provided by IDE. If you want to standardize the front-end code for historical projects, it will cause full screen errors, which will cause the error range to be uncontrollable. At the same time, it will also increase the workload of the test. After an error occurs, it is necessary to manually perform FIX execution commands on the specified file. Therefore, if we do not choose our automatic code inspection rules, we cannot ensure the correctness, effectiveness, standardization and efficiency of the inspection.

[0065] The other parts of this embodiment are the same as those of Embodiment 1, and thus will not be described in detail.

[0066] Embodiment 4:

[0067] This embodiment is further optimized on the basis of embodiment 1. In this embodiment, different inspection rules are set for different methods, which can check and support multiple modes, multiple scenarios, comprehensive coverage, flexible settings and compatibility with various product projects.

[0068] The other parts of this embodiment are the same as those of Embodiment 1, and thus will not be described in detail.

[0069] Embodiment 5:

[0070] This embodiment is further optimized on the basis of any one of the above embodiments 1-4. In this embodiment, for SVN version library verification, when the user's SVN commit request command is received, the status verification of the current file will be triggered, and the files in the new and modified states will be added to the area to be verified.

[0071] The other parts of this embodiment are the same as any one of the above embodiments 1-4, so they are not repeated here.

[0072] Embodiment 6:

[0073] This embodiment is further optimized on the basis of any one of the above embodiments 1-4. In this embodiment, for GIT version library verification, when receiving the user's GIT commit request command, it will trigger the status verification of the current file, and will add the files in the three states of added, modified, and temporarily stored to the area to be verified. This method can control the scope of code impact and is very friendly to historical code maintenance.

[0074] The other parts of this embodiment are the same as any one of the above embodiments 1-4, so they are not repeated here.

[0075] Embodiment 7:

[0076] This embodiment is further optimized on the basis of embodiment 1. In this embodiment, each time the Ctrl+S key command is pressed to save the code, the first automatic correction of the error code will be automatically performed, the error will be corrected in advance, and the success rate of subsequent code storage will be increased.

[0077] The other parts of this embodiment are the same as those of Embodiment 1, and thus will not be described in detail.

[0078] Embodiment 8:

[0079] This embodiment is further optimized on the basis of any one of the above embodiments 1-7. In this embodiment, a list of files in the area to be verified is presented to the user for selection. It supports selecting all files in the area to be verified through the ALL selection command. After selecting the files, the corresponding commit request information is submitted. The program will automatically perform a standard verification of the commit request information to ensure the standardization and uniformity of the submitted information. After the submitted information passes the verification, the corresponding second automatic code verification and second automatic code repair will be performed to ensure the correctness and standardization of the code.

[0080] The second automated code check in this embodiment is that the verification device performs a second automated code check according to the configured rules, identifies errors in advance, and improves the success rate of subsequent code storage.

[0081] The second automatic repair of this embodiment is that the verification device automatically performs a second automatic correction of the error code, corrects the error in advance, and improves the success rate of subsequent code storage.

[0082] The other parts of this embodiment are the same as any one of the above embodiments 1-7, so they are not repeated here.

[0083] In another embodiment, the specific implementation of submitting information verification is exemplified as follows;

[0084] Standardize submission types and constrain them basically in accordance with the current mainstream methods;

[0085] feat: add new feature;

[0086] fix: fix bug;

[0087] docs: only modified the documents, such as README, CHANGELOG, CONTRIBUTE, etc.;

[0088] style: only changes spaces, format indentation, commas, etc., without changing the code logic;

[0089] refactor: code refactoring, no new features or bug fixes;

[0090] perf: optimization related, such as improving performance and experience;

[0091] test: test cases, including unit tests, integration tests, etc.;

[0092] chore: change the build process, or add dependent libraries, tools, etc.;

[0093] revert: Roll back to the previous version.

[0094] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A front-end code automatic verification method based on a centralized management mode, characterized in that: The following steps are involved: Step S1. Preset the automated code checking rules to be activated; the automated code checking rules include SVN code checking rules and GIT code checking rules; Step S2. Enter the front-end code project to be verified, and configure the automated code checking rules to be activated into the front-end code project; Step S3. The user manually selects whether the code hosting method is GIT or SVN, and selects the corresponding automated code checking rules according to the hosting method; Step S4. Select the type of automated code checking rules, and determine whether it is necessary to set corresponding checking rules by yourself according to the type. If yes, select the customized method and generate corresponding automated code checking rules according to the self-set checking rules. If no, start the default setting checking rules and generate default automated code checking rules. Step S5. Activate the automated code checking rules corresponding to the hosting mode and type; Step S6. Edit the front-end code in the front-end code project to be verified, and perform the first automated code verification on the front-end code according to the activated automated code verification rule to determine whether the front-end code has an error. If so, perform the first code repair on the error code after saving the front-end code, submit the repaired code to the code repository, select the number of repaired code files, and then continue to start the automated code verification rule; if not, the automated code verification rule cannot be started; Step S7. Continue to check the front-end code project to be checked according to the automated code checking rules, perform a corresponding second automated code check and a second automated code repair on the front-end code, and determine whether the output verification result is correct. If so, put the front-end code to be checked into the database; if not, return to step S5.

2. According to the method of front-end code automatic verification based on centralized management mode in claim 1, it is characterized in that: The step S3 includes: when the user does not select the code hosting method, entering the management of the front-end code default configuration, and not selecting the automatic code checking rule.

3. According to the method of front-end code automatic verification based on centralized management mode in claim 1, it is characterized in that: The step S3 further includes: activating and starting the corresponding SVN code checking rule or GIT code checking rule according to the hosting mode.

4. A front-end code automatic verification method based on a centralized management mode according to any one of claims 1 to 3, characterized in that: The SVN code checking rule includes: triggering a status checking rule of a current SVN code file when receiving an SVN code selected by a user through an SVN request command; According to the status verification rules of SVN code files, SVN code files in the new and modified states are added to the SVN to-be-verified area.

5. A front-end code automatic verification method based on a centralized management mode according to any one of claims 1 to 3, characterized in that: The GIT code checking rule includes: triggering a status checking rule of the current GIT code file when receiving the GIT code selected by the user through the GIT request command; According to the status verification rules of GIT code files, GIT code files in the three states of added, modified and temporarily stored are added to the GIT waiting for verification area.

6. The method for automatic verification of front-end codes based on a centralized management mode according to claim 1, characterized in that: The first code repair in step S6 includes: each time the front-end code is saved, the error code is automatically corrected through a preset key command.

7. A front-end code automatic verification method based on a centralized management mode according to any one of claims 1 to 3, characterized in that: The step S7 includes: adding the code file to the to-be-verified area of ​​the corresponding code hosting mode, and selecting the code file in the to-be-verified area by using the select all command; Submit the corresponding request information and code files, perform the corresponding second automatic code verification and second automatic code repair on the submitted request information and code files according to the automatic code checking rules, and output the verification results.

Citation Information

Patent Citations

  • Code review method and device

    CN109491663A

  • Software code review method and device

    CN112748950A