# How to add custom Java rules in SonarCloud?

**URL:** <https://community.sonarsource.com/t/how-to-add-custom-java-rules-in-sonarcloud/83297>\
**Category:** SonarQube Cloud\
**Tags:** sonarqube-cloud\
**Created:** [February 7, 2023, 2:34pm UTC](https://community.sonarsource.com/t/how-to-add-custom-java-rules-in-sonarcloud/83297 "2023-02-07T14:34:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Subbu\_M](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/subbu_m/32/41490_2.png) [@Subbu\_M](https://community.sonarsource.com/u/Subbu_M)\
**Post date:** [February 7, 2023, 2:34pm UTC](https://community.sonarsource.com/t/how-to-add-custom-java-rules-in-sonarcloud/83297/1 "2023-02-07T14:34:49Z")

</div>

Hi All,

We are planning to use Sonar Cloud SaaS licensing for analyzing our java projects. I would like to define/import custom java rules to Sonar Cloud. Is it possible to define custom rules in Sonar Cloud

TIA

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [February 8, 2023, 12:32pm UTC](https://community.sonarsource.com/t/how-to-add-custom-java-rules-in-sonarcloud/83297/2 "2023-02-08T12:32:45Z")

</div>

Hey there.

SonarCloud does not support custom rules – with the exception of importing [external analyzer reports](https://docs.sonarcloud.io/enriching/external-analyzer-reports/).

If you have rule ideas you think could benefit all Sonar users, I recommend suggesting them here: [New rules / languages - Sonar Community](https://community.sonarsource.com/c/clean-code/rules/13)

---

<div class="post-metadata">

**Author:** ![Subbu\_M](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/subbu_m/32/41490_2.png) [@Subbu\_M](https://community.sonarsource.com/u/Subbu_M)\
**Post date:** [February 14, 2023, 4:15am UTC](https://community.sonarsource.com/t/how-to-add-custom-java-rules-in-sonarcloud/83297/3 "2023-02-14T04:15:49Z")

</div>

Thanks Colin. We need to import custom rules for COTS product. If we cannot define/import custom rules in SonarCloud then we might need to consider Enterprise version of SonarQube
