How to Activate/trigger Sonar Cloud code analysis rules

We just started using Sonar Cloud and we are at the beginning stage of setting it up. Once we did the project build setup and I tried to produce code smell in the code file.

Let’s say I just created an empty function without any implementation and it is not used anywhere else but the rule did not trigger for that.

My question is how we have to activate the rules or specific rule so that it will trigger any time when we do the build?

Hi @sfaheem447,

What development platform (GitHub/BitbucketCloud/AzureDevops) do you use and what CI do you use?
We have some sample projects that may help you.

Also don’t forget to check out our docs.

Cheers,

Hi

We are using AzureDevops and we are using Git through TFS.
Please let me know if you need more info?

Thanks

Hi,

Could you share the result of your analysis on SonarCloud, or share the link to your project if it’s public?
Also, could you share the logs of your analysis?

Thanks,

Can you please help me to resolve this issue?

Hi,

It seems you are using an external linter for CSS.
Make sure that the property sonar.css.stylelint.reportPaths links to the correct report path.
You can check our docs here for more info.

Cheers

Thanks for the reply. Just wanted to let you know that we are not explicitly using any external linter for CSS. We are using the regular CSS for our project. Now what you think might be causing this issue?

Hi,

We are investigating under this thread:

Cheers,

@sfaheem447 If you have no further questions about activating / triggering SonarCloud code analysis, then let’s close this thread.

Regarding your second question with the Illegal char <<> at ... error, it’s an unrelated topic, so it belongs in a different thread. In fact you’ve already created another thread for it, so let’s continue the discussion there.