Can i make custom rule for 'sonar-kotlin'?
Py0zz1 opened this issue · 4 comments
Py0zz1 commented
I can create detekt custom rules, but it seems that you cannot create custom rules for sonar-kotlin(sonarqube plugin).
If you can make a custom rule for sonar-kotlin, could you tell me the related data?
cortinico commented
Py0zz1 commented
Hi cortinico.
I want to define custom rule in 'sonar-kotlin' and use it in 'sonarqube'.
May I know the procedure for this?
Here's what I think.
- Define custom rules in detekt (like this: https://detekt.github).io/detekt/extensions.html)
- Set detekt with custom rules as sonar-kotlin dependency library
- Additional work on sonar-kotlin ~~
cortinico commented
May I know the procedure for this?
What you wrote is essentially correct:
- Define a detekt custom rule & create the artifact for it
- Fork sonar-kotlin
- Add a dependency inside the pom.xml https://github.com/detekt/sonar-kotlin/blob/master/pom.xml to your custom rule
- Rebuild your local fork of sonar-kotlin from source
Py0zz1 commented
I got it. thank you!