# \#custom\_rules

**URL:** https://community.sonarsource.com/tag/custom-rules/61.md

[Latest](https://community.sonarsource.com/latest.md) · [Categories](https://community.sonarsource.com/categories.md) · [Tags](https://community.sonarsource.com/tags.md)

---

## [Smell positive verification](https://community.sonarsource.com/t/smell-positive-verification/190526)

<div class="topic-metadata">

**Author:** [@Haroon](https://community.sonarsource.com/u/Haroon)\
**Replies:** 1\
**Last updated:** [October 29, 2026, 3:08pm UTC](https://community.sonarsource.com/t/smell-positive-verification/190526 "2026-10-29T15:08:43Z")

</div>

Hey, I am new to SonarQube and i found it difficult to plugin custom rules for C# (Type-Checking , s2301-Flag-Argument and s1067-Complicated Boolean Expression) also when i looked it up for C# plugins what i found is t…

---

## [Create a custom rule for review dependecis versions](https://community.sonarsource.com/t/create-a-custom-rule-for-review-dependecis-versions/176775)

<div class="topic-metadata">

**Author:** [@JesusGarce22](https://community.sonarsource.com/u/JesusGarce22)\
**Replies:** 1\
**Last updated:** [January 23, 2026, 4:14pm UTC](https://community.sonarsource.com/t/create-a-custom-rule-for-review-dependecis-versions/176775 "2026-01-23T16:14:01Z")

</div>

I need to create or configure a rule to analyze the library versions I’m using in my development. For example, I need it to check if I’m using Python 3.10 or the latest version of Node.js. I’d also like to know if ther…

---

## [How to apply formatting onto External Issues' rule description?](https://community.sonarsource.com/t/how-to-apply-formatting-onto-external-issues-rule-description/150060)

<div class="topic-metadata">

**Author:** [@Hao\_Yen\_Thien](https://community.sonarsource.com/u/Hao_Yen_Thien)\
**Replies:** 2\
**Last updated:** [October 14, 2025, 2:17am UTC](https://community.sonarsource.com/t/how-to-apply-formatting-onto-external-issues-rule-description/150060 "2025-10-14T02:17:11Z")

</div>

Hi, I am currently working on importing external issues onto a SonarQube project. The external issues is working as intended. But I would like to ask is there a way to format or create markdowns for the rule’s descript…

---

## [Custom Sonar Rule for HTML/Web](https://community.sonarsource.com/t/custom-sonar-rule-for-html-web/149659)

<div class="topic-metadata">

**Author:** [@Evan\_Bourque](https://community.sonarsource.com/u/Evan_Bourque)\
**Replies:** 1\
**Last updated:** [October 1, 2025, 1:17pm UTC](https://community.sonarsource.com/t/custom-sonar-rule-for-html-web/149659 "2025-10-01T13:17:18Z")

</div>

The documentation includes general guidance on adding coding rules, including which languages support adding custom rules, and general guidance on how to go about it. If the docs don’t answer your question, please tell …

---

## [Creating new rule for tsql language to identify sql anti-patterns](https://community.sonarsource.com/t/creating-new-rule-for-tsql-language-to-identify-sql-anti-patterns/147120)

<div class="topic-metadata">

**Author:** [@darshmur](https://community.sonarsource.com/u/darshmur)\
**Replies:** 1\
**Last updated:** [August 21, 2025, 3:01pm UTC](https://community.sonarsource.com/t/creating-new-rule-for-tsql-language-to-identify-sql-anti-patterns/147120 "2025-08-21T15:01:02Z")

</div>

Hello, We have scanned SQL script .sql extension files and got the scan results based on the rules defined under Sonar Way quality profile. we have following questions regarding this: Can we create our own rules to id…

---

## [Our YAML rules are regarded as yml, and they can't be activated in the YAML quality profile](https://community.sonarsource.com/t/our-yaml-rules-are-regarded-as-yml-and-they-cant-be-activated-in-the-yaml-quality-profile/145001)

<div class="topic-metadata">

**Author:** [@gulvxingren](https://community.sonarsource.com/u/gulvxingren)\
**Replies:** 2\
**Last updated:** [August 6, 2025, 1:12am UTC](https://community.sonarsource.com/t/our-yaml-rules-are-regarded-as-yml-and-they-cant-be-activated-in-the-yaml-quality-profile/145001 "2025-08-06T01:12:59Z")

</div>

We write some YAML custom rules, however, our YAML rules are regarded as yml language, not YAML： As the image above shows, our YAML custom rules have YAML tag, however, they are not included in the YAML rules, but y…

---

## [How to Verify NoSonarFilter Functionality in a Custom SonarQube Plugin](https://community.sonarsource.com/t/how-to-verify-nosonarfilter-functionality-in-a-custom-sonarqube-plugin/136090)

<div class="topic-metadata">

**Author:** [@Dushyant\_Aneja](https://community.sonarsource.com/u/Dushyant_Aneja)\
**Replies:** 4\
**Last updated:** [March 5, 2025, 9:36am UTC](https://community.sonarsource.com/t/how-to-verify-nosonarfilter-functionality-in-a-custom-sonarqube-plugin/136090 "2025-03-05T09:36:47Z")

</div>

I am working on activating the NOSONAR feature in a custom SonarQube plugin we implemented for the Natural mainframe language. To achieve this, I used the NoSonarFilter.NoSonarInFile() method, as documented in the SonarQ…

---

## [NOSONAR for custom sonar plug for language that are not supported by the conventional sonarqube](https://community.sonarsource.com/t/nosonar-for-custom-sonar-plug-for-language-that-are-not-supported-by-the-conventional-sonarqube/132850)

<div class="topic-metadata">

**Author:** [@montu\_aneja](https://community.sonarsource.com/u/montu_aneja)\
**Replies:** 2\
**Last updated:** [February 18, 2025, 9:14pm UTC](https://community.sonarsource.com/t/nosonar-for-custom-sonar-plug-for-language-that-are-not-supported-by-the-conventional-sonarqube/132850 "2025-02-18T21:14:02Z")

</div>

Hi everyone, I am working on a custom SonarQube plugin for a programming language that are not supported by the conventional sonar plugin. My current task is to implement a feature where lines containing a specific key…

---

## [Custom rule for Mulesoft Code not working in SonarQube](https://community.sonarsource.com/t/custom-rule-for-mulesoft-code-not-working-in-sonarqube/134665)

<div class="topic-metadata">

**Author:** [@kaushik\_vankayala](https://community.sonarsource.com/u/kaushik_vankayala)\
**Replies:** 3\
**Last updated:** [February 12, 2025, 1:54pm UTC](https://community.sonarsource.com/t/custom-rule-for-mulesoft-code-not-working-in-sonarqube/134665 "2025-02-12T13:54:22Z")

</div>

Hi There, I have recently implemented the sonarqube integration for Mule 4 applications following the below tutorial. Publish Mule 4 Code Review and Coverage to SonarQube I am now trying to write a custom rule, which …

---

## [Best way to scan dockerfile for specific command?](https://community.sonarsource.com/t/best-way-to-scan-dockerfile-for-specific-command/133395)

<div class="topic-metadata">

**Author:** [@alden.erazo](https://community.sonarsource.com/u/alden.erazo)\
**Replies:** 1\
**Last updated:** [January 21, 2025, 12:22pm UTC](https://community.sonarsource.com/t/best-way-to-scan-dockerfile-for-specific-command/133395 "2025-01-21T12:22:57Z")

</div>

I’m trying to create a custom rule that checks to make sure our Dockerfiles are taking a specific image from the correct repository. It would be a very simple check, just looking for the presence of a single line of text…

---

## [Is it possible to apply profile only for specific paths in big project?](https://community.sonarsource.com/t/is-it-possible-to-apply-profile-only-for-specific-paths-in-big-project/133345)

<div class="topic-metadata">

**Author:** [@arielman](https://community.sonarsource.com/u/arielman)\
**Replies:** 6\
**Last updated:** [January 15, 2025, 10:10am UTC](https://community.sonarsource.com/t/is-it-possible-to-apply-profile-only-for-specific-paths-in-big-project/133345 "2025-01-15T10:10:23Z")

</div>

I have big project in my sonar server. I created custom rules and attached them to new profile. Now I want to add this profile to the project, but I want it will be applied only for specific paths, and not the entire pro…

---

## [Is there any way to create custom rules from sonarqube UI](https://community.sonarsource.com/t/is-there-any-way-to-create-custom-rules-from-sonarqube-ui/132673)

<div class="topic-metadata">

**Author:** [@Jas\_G](https://community.sonarsource.com/u/Jas_G)\
**Replies:** 1\
**Last updated:** [December 24, 2024, 8:17am UTC](https://community.sonarsource.com/t/is-there-any-way-to-create-custom-rules-from-sonarqube-ui/132673 "2024-12-24T08:17:38Z")

</div>

Is there any way to create custom rules from sonarqube UI instead of deploying as jar in extension path. We have successfully deployed custom plugin for JAVA in sonarqube and analyzed it. But, we have many custom rules n…

---

## [Custom rule creation for C++ code inspection](https://community.sonarsource.com/t/custom-rule-creation-for-c-code-inspection/103722)

<div class="topic-metadata">

**Author:** [@CodeHunger](https://community.sonarsource.com/u/CodeHunger)\
**Replies:** 4\
**Last updated:** [December 17, 2024, 1:30pm UTC](https://community.sonarsource.com/t/custom-rule-creation-for-c-code-inspection/103722 "2024-12-17T13:30:53Z")

</div>

Hello, I read in one of the community topics replies that SonarQube doesn’t support the creation of the custom rule for C++, but SonarQube team can help to add rules for the customers, so wanted to check if there is any …

---

## [Plist files not detect and scanned in Sonar](https://community.sonarsource.com/t/plist-files-not-detect-and-scanned-in-sonar/131652)

<div class="topic-metadata">

**Author:** [@gabriel.linero](https://community.sonarsource.com/u/gabriel.linero)\
**Replies:** 4\
**Last updated:** [December 9, 2024, 2:28pm UTC](https://community.sonarsource.com/t/plist-files-not-detect-and-scanned-in-sonar/131652 "2024-12-09T14:28:31Z")

</div>

description of the Rule. I want to detect specific configuration in a plist file (that follows xml), which is basically specific for iOS applications. However, sonar does not take the plist file and onboard it in the …

---

## [How can I create custom java rule for log.error method calls?](https://community.sonarsource.com/t/how-can-i-create-custom-java-rule-for-log-error-method-calls/131111)

<div class="topic-metadata">

**Author:** [@Rishabh\_Kumar\_Singh](https://community.sonarsource.com/u/Rishabh_Kumar_Singh)\
**Replies:** 2\
**Last updated:** [December 4, 2024, 7:15am UTC](https://community.sonarsource.com/t/how-can-i-create-custom-java-rule-for-log-error-method-calls/131111 "2024-12-04T07:15:40Z")

</div>

I am trying to create a java rule for my java repositories. My objective is to create this rule: Any object derived from Exception should not be passed as argument in log.error method. I have followed the https://gith…

---

## [Custom rules with Sonar plugin](https://community.sonarsource.com/t/custom-rules-with-sonar-plugin/128971)

<div class="topic-metadata">

**Author:** [@gabriel.linero](https://community.sonarsource.com/u/gabriel.linero)\
**Replies:** 2\
**Last updated:** [October 30, 2024, 4:43pm UTC](https://community.sonarsource.com/t/custom-rules-with-sonar-plugin/128971 "2024-10-30T16:43:03Z")

</div>

Looking at the documentation, there is limited options for custom rules using XPath rules and most of the languages support the creation via plugins This is the first time I try to customise my own plugin in order to a…

---

## [Custom rules and Microsoft banned functions](https://community.sonarsource.com/t/custom-rules-and-microsoft-banned-functions/128006)

<div class="topic-metadata">

**Author:** [@gabriel.linero](https://community.sonarsource.com/u/gabriel.linero)\
**Replies:** 2\
**Last updated:** [October 16, 2024, 6:24am UTC](https://community.sonarsource.com/t/custom-rules-and-microsoft-banned-functions/128006 "2024-10-16T06:24:49Z")

</div>

The documentation includes general guidance on adding coding rules, including which languages support adding custom rules, and general guidance on how to go about it. If the docs don’t answer your question, please tell …

---

## [Need new custom rules for golang](https://community.sonarsource.com/t/need-new-custom-rules-for-golang/125317)

<div class="topic-metadata">

**Author:** [@Bolisetty\_Shravan](https://community.sonarsource.com/u/Bolisetty_Shravan)\
**Replies:** 1\
**Last updated:** [September 19, 2024, 6:09am UTC](https://community.sonarsource.com/t/need-new-custom-rules-for-golang/125317 "2024-09-19T06:09:32Z")

</div>

We are currently using the Community Edition of SonarQube. We primarily use Go in our repositories and require additional custom rules beyond the default ones provided by SonarQube. Is it possible for us to create these…

---

## [Add new custom rules for Java in Sonarqube](https://community.sonarsource.com/t/add-new-custom-rules-for-java-in-sonarqube/125064)

<div class="topic-metadata">

**Author:** [@rajukomari](https://community.sonarsource.com/u/rajukomari)\
**Replies:** 3\
**Last updated:** [September 16, 2024, 3:31pm UTC](https://community.sonarsource.com/t/add-new-custom-rules-for-java-in-sonarqube/125064 "2024-09-16T15:31:02Z")

</div>

The documentation includes general guidance on adding coding rules, including which languages support adding custom rules, and general guidance on how to go about it. If the docs don’t answer your question, please tell …

---

## [Custom rule is enabled on the server, but not available in SonarLint](https://community.sonarsource.com/t/custom-rule-is-enabled-on-the-server-but-not-available-in-sonarlint/117208)

<div class="topic-metadata">

**Author:** [@Scheffmann](https://community.sonarsource.com/u/Scheffmann)\
**Replies:** 6\
**Last updated:** [September 12, 2024, 11:14am UTC](https://community.sonarsource.com/t/custom-rule-is-enabled-on-the-server-but-not-available-in-sonarlint/117208 "2024-09-12T11:14:19Z")

</div>

Please provide Operating system: PyCharm 2023.1.5 on Windows 11 SonarLint plugin version: 10.3.0.77475 Programming language you’re coding in: Python Is connected mode used:Yes Connected to SonarCloud or SonarQube (and…

---

## [SonarLint: Custom Rules 101](https://community.sonarsource.com/t/sonarlint-custom-rules-101/120647)

<div class="topic-metadata">

**Author:** [@balbi\_andre](https://community.sonarsource.com/u/balbi_andre)\
**Replies:** 6\
**Last updated:** [August 15, 2024, 11:41am UTC](https://community.sonarsource.com/t/sonarlint-custom-rules-101/120647 "2024-08-15T11:41:06Z")

</div>

Enterprise Edition Version 9.9.1 (build 69595) Docker Context I have a set of custom rules installed in my SonarQube server, I want the rules from my custom plugin (installed .jar) to be shown to every developer using…

---

## [How to create Custom rules in Sonarqube for Python Code?](https://community.sonarsource.com/t/how-to-create-custom-rules-in-sonarqube-for-python-code/119570)

<div class="topic-metadata">

**Author:** [@Sumesh\_R](https://community.sonarsource.com/u/Sumesh_R)\
**Replies:** 4\
**Last updated:** [July 24, 2024, 3:26pm UTC](https://community.sonarsource.com/t/how-to-create-custom-rules-in-sonarqube-for-python-code/119570 "2024-07-24T15:26:13Z")

</div>

Hi , I am trying to add a custom rule for my python code where i need to scan logging statements containing payload values in the submodules. These values are present in the submodule which in separate scm repository an…

---

## [Sonar Enterprise Pull Request analysis not reporting result for custom rule](https://community.sonarsource.com/t/sonar-enterprise-pull-request-analysis-not-reporting-result-for-custom-rule/118342)

<div class="topic-metadata">

**Author:** [@tdennler](https://community.sonarsource.com/u/tdennler)\
**Replies:** 5\
**Last updated:** [July 17, 2024, 1:04pm UTC](https://community.sonarsource.com/t/sonar-enterprise-pull-request-analysis-not-reporting-result-for-custom-rule/118342 "2024-07-17T13:04:12Z")

</div>

SonarQube Enterprise Edition Version 10.3 (build 82913) Deployment: Installation on virtual machine On our production SonarQube server we run both full scans and pull request scans. We also have 5 custom rules defined…

---

## [Rule to detect external or CDN references in HTML?](https://community.sonarsource.com/t/rule-to-detect-external-or-cdn-references-in-html/94795)

<div class="topic-metadata">

**Author:** [@fredissy](https://community.sonarsource.com/u/fredissy)\
**Replies:** 2\
**Last updated:** [July 9, 2024, 12:12pm UTC](https://community.sonarsource.com/t/rule-to-detect-external-or-cdn-references-in-html/94795 "2024-07-09T12:12:32Z")

</div>

Hello, My company deploys sensitive applications, for which all content (pages, API calls, JS, web resources) must be served from an unique domain name. We are not allowed to use content from a 3rd party website, CDN or…

---

## [Add python custom rules](https://community.sonarsource.com/t/add-python-custom-rules/118566)

<div class="topic-metadata">

**Author:** [@iawos9](https://community.sonarsource.com/u/iawos9)\
**Replies:** 1\
**Last updated:** [July 9, 2024, 11:56am UTC](https://community.sonarsource.com/t/add-python-custom-rules/118566 "2024-07-09T11:56:44Z")

</div>

Hello! I was wondering if I can add custom rules for python source code? For example, there’s a rule saying: (When generating cryptographic keys (or key pairs), it is important to use a key length that provides enough …

---

## [Where to submit feature request for BARR-C:2018 coding standard?](https://community.sonarsource.com/t/where-to-submit-feature-request-for-barr-c-2018-coding-standard/117376)

<div class="topic-metadata">

**Author:** [@jacobq](https://community.sonarsource.com/u/jacobq)\
**Replies:** 2\
**Last updated:** [July 1, 2024, 12:52pm UTC](https://community.sonarsource.com/t/where-to-submit-feature-request-for-barr-c-2018-coding-standard/117376 "2024-07-01T12:52:42Z")

</div>

I would like to be able to scan some of my C projects for compliance with BARR-C:2018. However, I see that it is not listed on C static code analysis although there are some tags for rules related to other sets like mis…

---

## [Testing Example Plugin - 2024](https://community.sonarsource.com/t/testing-example-plugin-2024/111737)

<div class="topic-metadata">

**Author:** [@balbi\_andre](https://community.sonarsource.com/u/balbi_andre)\
**Replies:** 4\
**Last updated:** [June 17, 2024, 3:29pm UTC](https://community.sonarsource.com/t/testing-example-plugin-2024/111737 "2024-06-17T15:29:26Z")

</div>

I’m developing rules for a non-supported language (Gherkin) using sonar-custom-plugin-example shown in this doc I need help to develop an unit test layer to assert that my rules are working correctly. However, there is …

---

## [How should I operate in order to develop Java language rules myself and see them on this page](https://community.sonarsource.com/t/how-should-i-operate-in-order-to-develop-java-language-rules-myself-and-see-them-on-this-page/115607)

<div class="topic-metadata">

**Author:** [@happy](https://community.sonarsource.com/u/happy)\
**Replies:** 1\
**Last updated:** [May 21, 2024, 12:33pm UTC](https://community.sonarsource.com/t/how-should-i-operate-in-order-to-develop-java-language-rules-myself-and-see-them-on-this-page/115607 "2024-05-21T12:33:30Z")

</div>

---

## [For sonarqube-10.4.0.87286, could you please help?](https://community.sonarsource.com/t/for-sonarqube-10-4-0-87286-could-you-please-help/110140)

<div class="topic-metadata">

**Author:** [@ct24p](https://community.sonarsource.com/u/ct24p)\
**Replies:** 4\
**Last updated:** [April 26, 2024, 4:14pm UTC](https://community.sonarsource.com/t/for-sonarqube-10-4-0-87286-could-you-please-help/110140 "2024-04-26T16:14:54Z")

</div>

Sonarqube-10.4.0.87286 Deployed zip file locally Tried to update existing customized rules for java and modifying the html file associated with the rules (In java-custom-rules-example of sonar-java 7.32.0-SNAPSHOT, no …

---

## [C++ custom rules with Enterprise Edition](https://community.sonarsource.com/t/c-custom-rules-with-enterprise-edition/75485)

<div class="topic-metadata">

**Author:** [@charlespnh](https://community.sonarsource.com/u/charlespnh)\
**Replies:** 5\
**Last updated:** [March 18, 2024, 3:02pm UTC](https://community.sonarsource.com/t/c-custom-rules-with-enterprise-edition/75485 "2024-03-18T15:02:53Z")

</div>

Hello, I know this sort of question can be answered by reading the formal SonarQube’s doc and it even has been asked already in this forum, in particular with Community/Developer Edition… but still I want to ask again j…

[Next page](https://community.sonarsource.com/tag/custom-rules/61.md?match_all_tags=true&page=1&tags%5B%5D=custom_rules)
