Conversation
@satabin Good catch and Thanks! for the contribution. |
Yes, I will do that. |
For custom rules created from a template rule, the `internalKey` is set to the internal key of the template rule by Sonar and not the custom rule key. When looking up the rule by internal key and providing the custom rule key, nothing is found as they do not match.
afe95d6
to
9cc3ff4
Compare
I added a test and took the occasion to fix another one that was not checking anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one - thanks for contributing and implementing the tests which @BalmungSan asked for. I've made a minor inline comment about your testing style and I'll be happy to merge and release as soon you've addressed it. Thanks again
src/test/scala/com/mwz/sonar/scala/scalastyle/ScalastyleSensorSpec.scala
Outdated
Show resolved
Hide resolved
9cc3ff4
to
60daf57
Compare
Thanks for the fix @satabin. |
Released as 7.3.1. |
Awesome, thanks! |
For custom rules created from a template rule, the
internalKey
is setto the internal key of the template rule by Sonar and not the custom
rule key. When looking up the rule by internal key and providing the
custom rule key, nothing is found as they do not match.
Here is the rule created in sonarqube

and the API returns the following object:
Using the rule key with repository to lookup fo rules ensures that even custom rules are found.