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 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 .
- 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 .
- 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