Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ CodeArts Check/ User Guide/ Reference/ Using CodeArts Check Plug-in in IntelliJ IDEA

Using CodeArts Check Plug-in in IntelliJ IDEA

Updated on 2024-11-29 GMT+08:00

This plug-in is a powerful assistant for developers to protect the code quality. It provides industry standard check, one-click code style formatting, and automatic code fixing, adhering to the concepts of simplicity, high speed, and real-time monitoring.

Installing the Plug-in

  1. On the IntelliJ IDEA editor, choose File > Settings on the top menu bar.
  2. Click Plugins in the navigation pane on the left and click Marketplace in the right pane.
  3. Enter Huawei Cloud CodeArts Check or CodeArts Check in the search box.
  4. Click Install. Then IntelliJ IDEA restarts. After the restart, IntelliJ IDEA automatically downloads the engine package and the JDK package.
  5. Once the download is finished, a message appears in the lower right corner confirming the successful download.

Configuring the Plug-in

  1. Click CodeArts Check at the bottom of the IntelliJ IDEA editor and click Setting on the toolbar.

  2. In the displayed window, click on the left to view the rule details.
  3. Decide whether to enable automatic code check, enter the masked directory, and specify directory to be checked.

  4. See the activated or applied rule details (including status, level, language, engine tag, and rule type) or filter rules by all/recommended rule set.

  5. After the configuration, click Apply.

Checking and Fixing Files by the Plug-in

Take a local Java project as an example.

The CodeArts Check plug-in allows you to check one or multiple Java files, as well as the entire project. You can also correct code style issues with just one click. For details, see Plug-in Functions, One-Click Formatting and Automatic Fix, and Rule Configuration.

Plug-in Functions

  • Checking one or multiple files, as well as the entire project, and viewing the results.
    • Checking one file: In the editor area, right-click and click File Check with CodeArts Check. Alternatively, in the Project window, right-click the file to be checked and click File Check with CodeArts Check.

    • Checking multiple files: In the Project window, hold down Ctrl and select multiple files. Then, right-click and click File Check with CodeArts Check.

    • Checking the entire project: In the editor area, right-click and click Project Check with CodeArts Check. Alternatively, in the Project window, right-click the file and click Project Check with CodeArts Check.

  • Viewing defect details, severity, type, compliant example, non-compliant example, and fixing suggestion. Filtering defects by severity, rule, and file.
    • Viewing defects by file: Open the CodeArts Check window, click Defects > > View By File.

    • Viewing defects by severity: Open the CodeArts Check window, click Defects > , and select a defect type as required.

    • Triggering automatic check and defect update.

      The plug-in automatically checks code in real time and updates defects after you fix the code defects based on fixing suggestions.

One-Click Formatting and Automatic Fix

  • One-click formatting on a single file, multiple files, a folder, or an entire project.

    With one-click formatting, you can easily resolve common code specification issues in your project, such as extra spaces or blank lines.

    In the editor area, right-click and click Auto Format with CodeArts Check. Alternatively, in the Project window, right-click the file and click Auto Format with CodeArts Check.

  • Automatic fix for a single defect checked by the plug-in.

    The plug-in provides a preview window with suggestions on how to fix and the automatic fix function.

Rule Configuration

Open the CodeArts Check window, click Setting.

Table 1 Configurations

No.

Configuration

Description

1

Automatic code check after editing and before commit

  • Automatic code check after saved editing: Select whether to automatically trigger CodeArts Check after code is edited and saved. Automatic check does not affect the current window. Once you modify and save the code, the latest check results will be automatically updated in the Defects tab.
  • Automatic code check before commit: Select whether to automatically trigger CodeArts Check before code is committed.

2

Check mode

The local mode is used by default.

3

Excluded directory

Specify multiple directories by separating them with commas (,). To check the dir1 directory, enter dir1. To check dir2 in the dir1 directory, enter dir1/dir2.

If no directory is specified, all content of the entire project is checked by default. This parameter is valid only during project check.

4

Search by category

Search for or filter rules.

5

Setting rule

Select or deselect rules.

6

Uploading/Exporting rule

Export the rule details to an XLSX file on the local PC. Upload the rule file in XLSX format prepared on the local PC.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback