> For the complete documentation index, see [llms.txt](https://knowledgebase.autorabit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.autorabit.com/product-guides/integral-zone/iz-suite/iz-scan/anypoint-studio/source-code-analysis/anypoint-studio-rules-playground.md).

# Anypoint Studio - Rules Playground

Rules Playground is a tool for quick and easy development of **`Custom Rules`**

{% hint style="warning" %}

* Rules Playground functionality is part of Anypoint Studio plugin. Refer to [Installing Anypoint Studio plugin](/product-guides/integral-zone/iz-suite/iz-scan/anypoint-studio/installation/install-iz-analyzer-studio.md) for more information.
  {% endhint %}

### Features

1. Develop/Create a custom rule definition and evaluate against the project
2. Provides feedback about any syntax errors in the rule definition
3. Capability to evaluate the rule definition on Mule components, APIs, property files, pom.xml, etc.
4. Publish the rule definition to the configured server and activate it

### Custom Rule Editor

5. Click on **`Window`** -> **`Show View`** -> **`Other`** -> **`IZ Scan`** -> **`Custom Rule Editor`**
6. Custom rule editor properties -
   1. **`Rule Name`** - Name of the new custom rule
   2. **`Type`** - Select the type of rule, which can be one of
      1. Code Smell
      2. Bug
      3. Vulnerability
      4. Security Hotspot
   3. **`Severity`** - Select the rule severity, which can be one of
      1. Blocker
      2. Critical
      3. Major
      4. Minor
      5. Info
   4. **`Rule Definition`** - Groovy definition for the custom rule\
      &#x20;

      <figure><img src="/files/6jxtIogSYm2x8MjuTheL" alt=""><figcaption></figcaption></figure>

### Evaluating Custom Rule

1. Click on **`Evaluate Rule`** button to validate and execute the rule definition
2. Custom rule will be applied on the current project and results will be displayed in **`Evaluation Results`** section
3. Results in case of valid rule definition\
   &#x20;

   <figure><img src="/files/tqhDtcEcevcwlH7tlb9w" alt=""><figcaption></figcaption></figure>
4. Results in case of syntax errors in the rule definition\
   &#x20;

   <figure><img src="/files/VwClYkdsfGg1HU6k02MT" alt=""><figcaption></figcaption></figure>

### Publishing Custom Rule

{% hint style="warning" %}
Before publishing a custom rule, make sure you have:

* Created a custom Quality Profile from the default Profile.
* Appropriate access in the server to publish the rule.
  {% endhint %}

1. Expand the **`Publish Rule`** section
2. Enter the Rule Key and Description -
   1. **`Key`** - Unique key for the custom rule. The key will be auto populated, which can be changed if there are any conflicts
   2. **`Description`** - Description of the rule. Markdown syntax can be used to describe the rule\
      &#x20;

      <figure><img src="/files/PguPwO6xJaFmfA3tp8cg" alt=""><figcaption></figcaption></figure>
3. Click on **`Publish Rule`** to upload the rule to the configured server. Rule will be activated in the selected Quality Profile.

### See Also

* [On The Fly Results](/product-guides/integral-zone/iz-suite/iz-scan/anypoint-studio/source-code-analysis/anypoint-studio-analysis.md)
* [Source Code Analysis - Auto Fix Issues](/product-guides/integral-zone/iz-suite/iz-scan/vs-code-extension/source-code-analysis/autofix.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://knowledgebase.autorabit.com/product-guides/integral-zone/iz-suite/iz-scan/anypoint-studio/source-code-analysis/anypoint-studio-rules-playground.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
