- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Working with CodeArts Check
- Purchasing CodeArts Check
- Configuring Project-level Role Permissions
- Creating a Task
- Configuring a Task
- Executing a Task
- Viewing Check Results
- Querying Audit Logs
- Reference
- Best Practices
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
APIs
-
Task Management
- Creating a Check Task
- Deleting a Check Task
- Querying Tasks
- Executing a Check Task
- Stopping a Check Task
- Querying the Status of a Task
- Querying Historical Check Results
- Querying Selected Rule Sets of a Task (Version 2)
- Querying Selected Rule Sets of a Task (Version 3)
- Querying the Check Parameters of a Rule Set (Version 2)
- Querying the Check Parameters of a Rule Set (Version 3)
- Configuring the Check Parameters of a Task
- Modifying the Rule Set in a Task
- Querying Check Failure Logs
- Obtaining the Directory Tree of a Task
- Ignoring Directories of a Task
- Querying Advanced Configurations of a Task
- Configuring Advanced Configurations for a Task
- Issue Management
- Rule Management
-
Task Management
- Application Examples
- Appendixes
- Description
-
FAQs
-
General Issues
- Why Am I Told that a Task Is Running and I Should Try Again Later?
- Why Am I Told that I Don't Have Sufficient Permissions and I Should Check and Try Again?
- Why Am I Told that Cppcheck Cannot Tokenize the Code Correctly?
- Why Am I Told that No Dependency Exists in the Maven Repository?
- Why Am I Seeing Error CC.00070400.500?
- Why Don't I Have Enough Permissions When Clicking a Task Name?
- Why Does a Project with WPF in C# Fail?
- Why Is No Data Displayed After a Task Is Complete?
- Why Does a TypeScript Task Fail with a 404 Error in the Log?
- API Issues
-
General Issues
- Videos
- General Reference
Copied.
Checking Code from CodeArts Repo
Consistent coding habits and styles make code easier to read and maintain. You can use CodeArts Check to verify compliance with platform or industry-specific coding specifications.
This sample demonstrates how to check the code from CodeArts Repo, and helps you get started with CodeArts Check.
Prerequisites
- You have registered with Huawei Cloud and completed real-name authentication. If you do not have a HUAWEI account yet, follow these steps to create one:
- Visit the Huawei Cloud official website.
- Click Sign Up and create your account as instructed.
Once your account is created, the system automatically redirects you to your personal information page.
- Complete individual or enterprise real-name authentication. For details, see Real-Name Authentication.
- You have enabled CodeArts Free Edition. If not, enable it by referring to Purchasing a CodeArts Package.
Preparing a Repository in CodeArts Repo
- Log in to the Huawei Cloud console.
- Click
in the upper left corner and choose Developer Services > CodeArts from the service list.
- Click Access Service.
- Click Create Project, and select the Scrum template. Set the project name to Scrum01 and retain the default values for other parameters. Click OK to access the project.
- In the navigation pane, choose Code > Repo.
- Click New Repository. Select Template, and click Next.
- Search for Java Ant Demo and select the template. Click Next.
- Set the repository name to Repo01 and deselect Automatically create Check task. Retain the default values for other parameters and click OK.
Creating and Executing a Check Task from CodeArts Repo
- In the navigation pane, choose Code > Check.
- Click Create Task. On the displayed page, set the following parameters and retain the default values for other parameters.
- Name: Customize a task name, for example, CheckTask01.
- Repository: Select the code repository Repo01 created in Preparing a Repository in CodeArts Repo.
- Language: Select the language of the code to be checked. Select Java in this sample.
- Click Create Task.
- Click Start Check to execute the task.
Viewing Check Results
After the check is complete, the check results are displayed, including overview, issues, metrics, logs, and health status.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot