The boss will take you to experience CodeArts Check, the code checking service of Huawei Cloud

1 The developer's statement

As a developer, you don't want any criticism of his code at the beginning, because once you know that the code has been detected, you will pay extra effort to do a good job. In fact, from a developer's coding, you can learn more. With a clear understanding of what a programming language can do, you will learn to write more efficient code and find more patterns that will help you organize your code. How many people started familiar projects from clearing code inspection alarms when they first entered the factory. Code inspection can help us grow rapidly and help team members learn from each other's experience, but even better, the code quality has also been improved. , and easy to maintain.

Here, I will share with you how I review my code during the coding process for reference.

2 Review coding history

As a coder, an easy-to-use review tool can get twice the result with half the effort and quickly improve the ability. Through continuous understanding and comparison, I chose the Huawei Cloud CodeArts Check cloud service. The one-stop code inspection provided by this cloud service is powerful. Capabilities such as high concurrency, caching, increment, disaster recovery, flow control, differentiated scheduling, and automatic fault isolation have taken full advantage. Here I share how to use this cloud service.

CodeArts Check entry

Click HUAWEI CLOUD CodeArts Check cloud service to enter the CodeArts Check cloud service home page:

How to scan items

Click "Use Now" to enter the service. This time we use the existing demo project for experience. Directly click the "Execute Now" button or the "Start Check" button to start the scan task:

After the check is complete, you can click on the task name to view the task details:

We can click the number under "Number of Questions" to view the specific questions of the project code:

If you do not understand the problem or need repair help during the process of fixing the problem, you can click "problem help" under the problem to view the detailed description of the alarm, correct examples, error examples, repair suggestions and other information. After we have repaired all After the problem, you can continue to click the "Start Check" button to check whether it is successfully repaired;

How to configure rules

In the task scanning process of the experience project above, we use the direct start inspection, and the code inspection service will use the rule sets of Java, C++, PHP, C#, JS, TypeScript, HTML, CSS, Go and Python by default; and we are in In the actual process, you can add, copy, modify or delete custom rule sets according to your needs:

You can click the rule set name to view specific rules and rule details:

At the same time, we can also modify or set tasks for existing inspection tasks:

Click the JAVA language on the left to view all the rule sets it contains, and you can enable one of the rules and select "Start Check" again to scan this task (after enabling, this rule set is used to scan by default):

3 Developer's summary

When we are faced with a fleeting market opportunity and there is time pressure on software delivery, we may temporarily lower the standard for software quality appropriately. However, in the long run, we still need to pay attention to software quality. Software is written in code. Code quality is the decisive factor of software quality. Therefore, it is crucial to pay attention to the review of the code, which can save any troubles caused by production.

Guess you like

Origin blog.csdn.net/hwxiaozhi/article/details/131758857