In addition to the built-in rules, you can use custom user-defined rules to supplement judgment or exclude statements. The CLI uses --custom-rules <YAML file or directory> to load rules. For parameter descriptions, see Product form.
Rule types and behaviors
User Rules |
Current Behavior |
|---|---|
New rules:PATTERN, CategoryCUSTOM_REGEX |
Press after a hitERRORRecords static incompatibilities; does not rely on user-assigned lower severity levels |
Delete/Filter Rules:FILTER |
The statement is skipped during assessment; the same rule is also skipped when loaded during CLI execution; the source file content is not deleted. |
Rules must declare the applicable targetModes. If the CLI needs the same filtering rules when executing execute independently, you must provide the same --custom-rules again.
Configuration entry
- CLI: Use an external YAML file or directory. The target constraints of the rules should match those of the task.
Usage limitations
Statements that hit user-defined rules are not actually executed during the CLI execution phase but are recorded as inconsistent run results. For details, see SQL execution verification.