0
votes

I need to calculate squale remediation cost for some rule in csharp stylecop rules. Am trying to deploy customised csharp plugin in sonar4.5.4 but some rules getting error as

 java.lang.IllegalArgumentException: Debt definition on rule 'stylecopcsharp:ConstFieldNamesMustBeginWithUpperCaseLetter' is invalid
    at

but some other rules there was no such issues. Finally i got to know we need to calculate sqale remeditation cost for rules facing issue. Am using sonarqube 4.5.4 and trying to deplying customised sonar csharp stylecop plugin. Just i need to know the answer for few questions below: 1.I dont want to touch sonarqube server4.5.4.jar to change any code , is that possible to add calculating sqale remediation cost inside plugin code? if yes, can you please share any link regarding sample code or just explaination steps. Thank you :)

1

1 Answers

0
votes

First, there's no need to alter server code to provide SQALE values for rules in any plugin; the plugin is the place to do that.

You should consider submitting a pull request to the StyleCop plugin project. This is the file that would need to be updated. A pull request would be a far cleaner solution than creating a second plugin to provide the values omitted by the first.

Assuming your SQALE values are reasonable, I see no reason why you wouldn't get a reasonable turnaround on such a pull request.

Regarding the error you're currently receiving, there's no way to diagnose the issue without seeing the corresponding SQALE data for "stylecopcsharp:ConstFieldNamesMustBeginWithUpperCaseLetter"