Help Center/ CodeArts Check/ User Guide/ Configuring a Task/ Configuring a Rule Set/ Exporting or Importing Rule Sets in Batches
Updated on 2026-05-19 GMT+08:00

Exporting or Importing Rule Sets in Batches

CodeArts Check allows you to export rule sets and import them to other regions.

Constraints

  • A maximum of 1 MB package can be imported.
  • Only JSON files are supported.
  • A maximum of five rule sets can be imported.

Exporting Rule Sets

  1. Access CodeArts Check from the service portal.
  2. Go to the task page and click the Rule Sets tab.
  3. In the rule set list, select the rule sets to be exported (up to five rule sets).
  4. Click Export RuleSet to generate a .zip package. The package contains rule set files in JSON format, with each file containing enabled rules.

    The following shows rule configuration information in the JSON file in the exported .zip package.
    {
    	"id": "a86bf7c5172b40fc909f291247318151",
    	"name": "cmetrcis-java",  
    	"nameEn": "cmetrcis-java",  
    	"comments": "",
    	"commentsEn": "",
    	"type": "custom",
    	"creator": "paas-autotest-codecheck-7",
    	"createTime": "2025-01-17T03:33:41Z",
    	"lastReviser": "paas-autotest-codecheck-7",
    	"lastUpdateTime": "2025-01-17T03:34:04Z",
    	"language": "JAVA",
    	"parentId": "",
    	"managers": null,
    	"domainId": "171bf39aec9d47a3b39c30b1b694a0b9",
    	"inheritMode": null,
    	"creatorId": "050f714cf9d84bdd800ad9efed1735d9",
    	"numCriterion": 10,
    	"ruleInfos": [{
    		"id": "ce259b92fda842229fe7a0030dd7d1f3",
    		"name": "huge_cca_cyclomatic_complexity[JAVA]",
    		"nameCn": "huge cyclomatic complexity[JAVA]",
    		"isSupportVersion": "enable",  #Whether to support the version level. Options: enable and disable
    		"isSupportPersonal": "enable",  #Whether to support the gate level. Options: enable and disable
    		"isSupportIDE": "disable",
    		"severity": "2",#Severity. Options: 0 (critical), 1 (major), 2 (minor), and 3 (suggestion).
    		"language": "JAVA",
    		"systemTag": "cmetrics",
    		"criterionSetId": "a86bf7c5172b40fc909f291247318151",
    		"supportIDE": "0",
    		"supportVersion": "1",
    		"supportPersonal": "1",
    		"options": [{
    			"ruleId": "11eed05fb5850c498b8cfdc33df94278",
    			"ruleName": null,
    			"criterionId": "ce259b92fda842229fe7a0030dd7d1f3",
    			"criterionSetId": null,
    			"optionKey": "threshold",
    			"name": "New threshold",
    			"optionValue": "20",  #actual value of the option
    			"description": "If the CCA complexity of code exceeds the threshold, the code will be identified as huge cyclomatic complexity. This field is mandatory.",
    			"isDefault": true,
    			"editable": true,
    			"defaultValue": "20"   #default value of the option
    		}],
    		"delayEndTime": "2025-03-04T15:59:59Z",  #end time of deferral period
    		"delayStartTime": "2025-02-01T16:00:00Z",  #start time of deferral period
    		"toolVersion": "202106",
    		"uniqueId": "ce259b92fda842229fe7a0030dd7d1f3"
    	}]
    }

Importing Rule Sets

You must have the Tenant Administrator permission.

  1. Access CodeArts Check from the service portal.
  2. Go to the task page and click the Rule Sets tab.
  3. Click Import RuleSet on the right of the page.

    Figure 1 Importing rule sets

  4. In the displayed dialog box, click to select a .zip package. (Max. package size: 1 MB; max. 5 rule sets in JSON format)

    Figure 2 Uploading rule sets

  5. Click OK. The rule set import status dialog box is displayed. The timestamp and UUID are automatically added as a suffix to the name of the imported rule set.
  6. After the import is complete, click OK.