I’m using sonarlint extension in visual studio to analyze my C project locally, and i have defined rules set in settings.json . Rules set which are having numbers in it are analyzed properly, but rules which have string in it (ex:“common-c:DuplicatedBlocks”) is giving error like
Error message: Error converting value “common-c:DuplicatedBlocks” to type ‘System.Collections.Generic.Dictionary`2[System.String,SonarLint.VisualStudio.Core.RuleConfig]’. Path ‘[‘sonarlint.rules’]’, line 3, position 30. Default settings will be used
That error was caused by json format in settings.json file and it got solved
I’m using Sonarlint version: 6.12.0.59751 in visual studio 2019 professional edition, C rules which are having string in it or not considered as issue while analysing even though it’s mentioned in settings.json file
What configuration change do I need to make ,in order to consider all sonarqube rules in sonarlint analysis
I have made a sonarqube server setup also.
Even with that connection not all the issues which are reported by sonarqube are appearing in visual studio
Only limited issues are reported with sonarlint
Thanks for the input
In FAQ it’s mentioned that rules starting with common won’t be considered as issue, but other rules like c:CommentedCode, c:PPUndefUsage and c:SwitchWithoutDefault are also not getting reported by sonarlint
Thanks Ann, i referred the FAQ section there it’s mentioned few rules will not be supported by sonarlint
Is there any alternative way to get all the sonarqube issues locally apart from using sonarlint?
Is there any possible way to run sonar scanner in our local pc , where already sonarqube quality profile rule set is exported and present in the form of XML file.
Thereby getting the issues occurred locally without publishing into sonarqube