# How to Activate/trigger Sonar Cloud code analysis rules

**URL:** <https://community.sonarsource.com/t/how-to-activate-trigger-sonar-cloud-code-analysis-rules/13533>\
**Category:** SonarQube Cloud\
**Created:** [August 23, 2019, 7:18pm UTC](https://community.sonarsource.com/t/how-to-activate-trigger-sonar-cloud-code-analysis-rules/13533 "2019-08-23T19:18:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sfaheem447](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@sfaheem447](https://community.sonarsource.com/u/sfaheem447)\
**Post date:** [August 23, 2019, 7:18pm UTC](https://community.sonarsource.com/t/how-to-activate-trigger-sonar-cloud-code-analysis-rules/13533/1 "2019-08-23T19:18:12Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![aurelie](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/aurelie/32/849_2.png) [@aurelie](https://community.sonarsource.com/u/aurelie)\
**Post date:** [August 26, 2019, 7:15am UTC](https://community.sonarsource.com/t/how-to-activate-trigger-sonar-cloud-code-analysis-rules/13533/2 "2019-08-26T07:15:45Z")

</div>

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](https://sonarcloud.io/documentation/analysis/overview/).

Cheers,

---

<div class="post-metadata">

**Author:** ![sfaheem447](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@sfaheem447](https://community.sonarsource.com/u/sfaheem447)\
**Post date:** [August 26, 2019, 12:52pm UTC](https://community.sonarsource.com/t/how-to-activate-trigger-sonar-cloud-code-analysis-rules/13533/3 "2019-08-26T12:52:23Z")

</div>

Hi

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

Thanks

---

<div class="post-metadata">

**Author:** ![aurelie](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/aurelie/32/849_2.png) [@aurelie](https://community.sonarsource.com/u/aurelie)\
**Post date:** [August 27, 2019, 9:31am UTC](https://community.sonarsource.com/t/how-to-activate-trigger-sonar-cloud-code-analysis-rules/13533/4 "2019-08-27T09:31:11Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![sfaheem447](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@sfaheem447](https://community.sonarsource.com/u/sfaheem447)\
**Post date:** [August 27, 2019, 6:58pm UTC](https://community.sonarsource.com/t/how-to-activate-trigger-sonar-cloud-code-analysis-rules/13533/5 "2019-08-27T18:58:55Z")

</div>

Can you please help me to resolve this issue?

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/7/721e2695f0ca768ad36abc08449ac419af29ba4b.png)

---

<div class="post-metadata">

**Author:** ![aurelie](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/aurelie/32/849_2.png) [@aurelie](https://community.sonarsource.com/u/aurelie)\
**Post date:** [August 29, 2019, 7:55am UTC](https://community.sonarsource.com/t/how-to-activate-trigger-sonar-cloud-code-analysis-rules/13533/6 "2019-08-29T07:55:44Z")

</div>

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](https://sonarcloud.io/documentation/analysis/external-issues/) for more info.

Cheers

---

<div class="post-metadata">

**Author:** ![sfaheem447](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@sfaheem447](https://community.sonarsource.com/u/sfaheem447)\
**Post date:** [August 29, 2019, 1:12pm UTC](https://community.sonarsource.com/t/how-to-activate-trigger-sonar-cloud-code-analysis-rules/13533/7 "2019-08-29T13:12:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![aurelie](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/aurelie/32/849_2.png) [@aurelie](https://community.sonarsource.com/u/aurelie)\
**Post date:** [September 2, 2019, 2:41pm UTC](https://community.sonarsource.com/t/how-to-activate-trigger-sonar-cloud-code-analysis-rules/13533/8 "2019-09-02T14:41:47Z")

</div>

Hi,

We are investigating under this thread:

> [@Error on css linting](https://community.sonarsource.com/t/error-on-css-linting/13130/7):
>
> Hi @Nicolas_Harraudeau, unfortunately i have no idea where to find that file. we use sonarcloud, and all we did is to install the VSO extension within Azure devOps. we use the: Prepare Analysis Configuration task - with the following configs sonar.java.coveragePlugin=lcov sonar.javascript.lcov.reportPaths=(Build.SourcesDirectory)/coverage/lcov.info sonar.junit.reportPaths=(Build.SourcesDirectory)/test-results.xml Run Code Analysis task Publish Quality Gate Result task on our buil…

Cheers,

---

<div class="post-metadata">

**Author:** ![janos](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/janos/32/60_2.png) [@janos](https://community.sonarsource.com/u/janos)\
**Post date:** [September 17, 2019, 1:05pm UTC](https://community.sonarsource.com/t/how-to-activate-trigger-sonar-cloud-code-analysis-rules/13533/9 "2019-09-17T13:05:19Z")

</div>

@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](https://community.sonarsource.com/t/getting-build-errors-on-few-files/13532) for it, so let’s continue the discussion there.
