Unlock instant, AI-driven research and patent intelligence for your innovation.

Front-end code automatic checking method based on centralized management mode

A centralized management and verification method technology, applied in the field of computer automatic verification, can solve problems such as low familiarity with historical codes, uncontrollable project operation, and unavailability, etc., to achieve flexible settings, improve inspection efficiency and correct repair rate Effect

Pending Publication Date: 2022-01-11
CHENGDU DBAPP SECURITY
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] (1) In the scenario of centralized code management, usually the configuration authority of the code warehouse (server) is very high, and generally only the administrator has the configuration authority of the relevant server, although we can configure some more in the hooks folder on the server side. Commonly used hooks, such as pre-commit.bat, post-commit.bat, etc., are used for automatic checking before code submission, but this method becomes unavailable because administrator privileges cannot be obtained
[0004] (2) After all, most of the company's projects are stored on the centralized management server, so most of the above (1) will not work
The configuration check script is cumbersome and cannot guarantee that every member of the project team has configured hooks. Of course, it can also be implemented by writing a batch processing script to modify the registry information, but there is still the problem that user configuration cannot be unified
[0005] (3) Most programmers like to operate directly on the command line. When submittin

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Front-end code automatic checking method based on centralized management mode

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0054] A kind of front-end code automatic verification method based on the centralized management mode of this embodiment, 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 limited by the project, and the automatic code inspection rules can be flexibly configured with the project. It is not restricted by the administrator, and finally it can automatically check 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, unified configuration).

[0056] This embodiment proposes a method and device for automatic verification of front-end codes by using +Prettier+ESLint or TSLint inspection rules based on code centralized management mode, and realizes automatic inspection...

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-side hooks and server-side hooks, and users can define hook scripts by themselves. , this method gives users more flexibility, but it (customized script) can only be configured on the client or server side, generally only the administrator has the configuration authority of the relevant server, the user configures the hook through the client , the hook verification can only be triggered when the client submits the code, otherwise the hook will not take effect; if there are many project team members, all members participating in the project need to configure the script uniformly and submit the code by the client to ensure code standardization and unity. This method has relatively high limitations. In this embodiment, the problem of user-defined various hook script schemes can be solved by setting ...

Embodiment 3

[0064] This embodiment is further optimized on the basis of Embodiment 1. In this embodiment, if you do not choose the code hosting method, you will go to the default configuration and enter the management of the default configuration of the front-end code. This default configuration can be GIT configuration, do not choose automation Code inspection rules, which makes our use still not to pass the automatic code inspection rules, but to find hook scripts or custom hook scripts provided by others on the Internet to use with the code automation inspection plug-ins provided by the IDE; first, search for others on the Internet Hook scripts may have security issues. If online open source hook scripts are used by criminals, new security issues may be introduced. The content implemented by the scripts may not be applicable to our own projects, which has certain limitations, and there are still user-defined Various hook script schemes have the same defect problem. Secondly, the custom ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the technical field of computer automatic checking, and discloses a front-end code automatic checking method based on a centralized management mode, which comprises the following steps: presetting a to-be-activated automatic code checking rule; configuring the to-be-activated automatic code checking rule into the front-end code item; enabling the user to select a corresponding automatic code checking rule according to the hosting mode; selecting the type of the automatic code checking rule; activating an automatic code checking rule corresponding to the hosting mode and type; editing a front-end code in the to-be-checked front-end code item, and performing first-time automatic code verification and first-time code repair on the front-end code according to the activated automatic code check rule; and continuously checking the to-be-checked front-end code item according to the automatic code checking rule, performing corresponding second-time code automatic checking and second-time automatic code repair on the front-end code, judging whether an output checking result is correct or not, and storing the front-end code in a warehouse.

Description

technical field [0001] The present invention relates to the technical field of automatic computer verification, in particular, it is a front-end code automatic verification method based on a centralized management mode, which is used to support automatic code inspection and automatic repair in code centralized management scenarios, and improve inspection efficiency and repair accuracy. Background technique [0002] CR (Code Review, code review / code walkthrough) is a must for every product team in every company. Especially as a security company, code review is especially important. CR effectively standardizes the front-end code writing style, which can effectively reduce code reading costs and code errors, and also greatly improve the readability and robustness of code, and reduce later maintenance costs. At present, the commonly used CR mainly has the following methods: In the project mode where the front and back ends are not separated, most of them adopt the manual CR mod...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/41G06F8/71G06F11/36
CPCG06F8/43G06F8/71G06F11/3628
Inventor 罗金蓉范渊吴永越郑学新刘韬
Owner CHENGDU DBAPP SECURITY