# How could i create custom rules for python project

**URL:** <https://community.sonarsource.com/t/how-could-i-create-custom-rules-for-python-project/87864>\
**Category:** Writing rules\
**Tags:** python, custom\_rules\
**Created:** [March 23, 2023, 8:55am UTC](https://community.sonarsource.com/t/how-could-i-create-custom-rules-for-python-project/87864 "2023-03-23T08:55:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gagan-ceq](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/gagan-ceq/32/43414_2.png) [@gagan-ceq](https://community.sonarsource.com/u/gagan-ceq)\
**Post date:** [March 23, 2023, 8:55am UTC](https://community.sonarsource.com/t/how-could-i-create-custom-rules-for-python-project/87864/1 "2023-03-23T08:55:14Z")

</div>

i’m creating custom rules for python project but it is not working to scanthe code

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [March 24, 2023, 5:49pm UTC](https://community.sonarsource.com/t/how-could-i-create-custom-rules-for-python-project/87864/2 "2023-03-24T17:49:40Z")

</div>

Hi,

Welcome to the community!

Sorry you’re having trouble, but you’re going to have to give us a bit more to go on than that.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![gagan-ceq](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/gagan-ceq/32/43414_2.png) [@gagan-ceq](https://community.sonarsource.com/u/gagan-ceq)\
**Post date:** [March 27, 2023, 10:03am UTC](https://community.sonarsource.com/t/how-could-i-create-custom-rules-for-python-project/87864/3 "2023-03-27T10:03:17Z")

</div>

i’m scanning a python project with custom made rules but it is not sanning the bug that i’ve given there but by inbuilt rules it is scanning the same bug that i’ve made. so please help me to fix this

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [March 27, 2023, 5:01pm UTC](https://community.sonarsource.com/t/how-could-i-create-custom-rules-for-python-project/87864/4 "2023-03-27T17:01:27Z")

</div>

Hi,

What version of SonarQube are you developing against?

Also, can you provide your rule source and the code the issue should be raised on?

&nbsp;  
Ann
