# SonarCloud + GitHub + Pull Request Analysis = No Inline Comments

**URL:** <https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371>\
**Category:** SonarQube Cloud\
**Tags:** github-checks, pull-request, github, sonarqube-cloud\
**Created:** [February 28, 2019, 6:30pm UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371 "2019-02-28T18:30:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![romack](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@romack](https://community.sonarsource.com/u/romack)\
**Post date:** [February 28, 2019, 6:30pm UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/1 "2019-02-28T18:30:53Z")

</div>

We are in the process of evaluating SonarCloud in comparison to our current, on-prem SonarQube and am having issues with request analysis. Specifically with inline comments.

The analysis completes successfully and the Pull Request check shows up in GitHub (with a failed status), however I do not see the inline comments. Is that a configuration option or have those gone away in SonarCloud?

---

<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:** [March 1, 2019, 6:41am UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/2 "2019-03-01T06:41:06Z")

</div>

Indeed we have removed all comments from the **Conversation** tab. See [this announcement](https://community.sonarsource.com/t/pr-analysis-results-are-now-displayed-in-the-checks-tab-of-pull-requests-in-github/5870).

---

<div class="post-metadata">

**Author:** ![Rick-at-KUBRA](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rick-at-kubra/32/1915_2.png) [@Rick-at-KUBRA](https://community.sonarsource.com/u/Rick-at-KUBRA)\
**Post date:** [March 7, 2019, 9:36pm UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/3 "2019-03-07T21:36:01Z")

</div>

@janos That seems foolish. That was one of the biggest selling-points of using SonarCloud vs other scan services when we did an analysis last year.

Can we expect the Sonar-injected comments in the Conversations tab to come back in the future?

---

<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:** [March 8, 2019, 7:38am UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/4 "2019-03-08T07:38:20Z")

</div>

It seems the **Conversation** tab is intended for content by humans, not by robots. For that reason we don’t have plans to go back on that route. It seems Checks is the way to go for such automated checks that we do. We are considering to enrich the feature in that direction.

---

<div class="post-metadata">

**Author:** ![lewiso](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/lewiso/32/19666_2.png) [@lewiso](https://community.sonarsource.com/u/lewiso)\
**Post date:** [March 8, 2019, 10:59am UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/5 "2019-03-08T10:59:12Z")

</div>

Although I appreciate that conversations are better for humans, there is already extensive precedence for robot actions being annotated in that view. Furthermore, it is of massive value to get an automated GitHub “Review” from SonarCloud, and it would be good to use GitHub’s functionality for displaying that. This seems to have been taken away.

It is extra frustrating as I had sunk some time into trying to get this work as is described in your documentation:

> Pull Request analysis allows you to:
> 
> - see your Pull Request (PR) analysis results in the SonarCloud UI and see the green or red status to highlight the existence of open issues.
> - automatically decorate your PRs with SonarCloud issues in your SCM provider’s interface.

[https://sonarcloud.io/documentation/analysis/pull-request/](https://sonarcloud.io/documentation/analysis/pull-request/)

However, since your announcement, this is not how it works. At least please update your documentation to make this more clear.

And, please reconsider this decision.

---

<div class="post-metadata">

**Author:** ![Fabrice\_Bellingard](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/fabrice_bellingard/32/39_2.png) [@Fabrice\_Bellingard](https://community.sonarsource.com/u/Fabrice_Bellingard)\
**Post date:** [March 11, 2019, 1:49pm UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/6 "2019-03-11T13:49:44Z")

</div>

> [@lewiso](#):
>
> it is of massive value to get an automated GitHub “Review” from SonarCloud, and it would be good to use GitHub’s functionality for displaying that.

As @janos said, Checks functionality is now the way GitHub expects external integrations like SonarCloud to contribute information to a Pull Request - instead of “abusing” the comment feature to kind of “pollute” human reviews.  
If you think this is not working well, I suggest that you push this feedback to GitHub forums.

> [@lewiso](#):
>
> However, since your announcement, this is not how it works. At least please update your documentation to make this more clear.

Can you clarify what makes users think that the PR decoration is done through comments instead of checks? The documentation does not mention comments - so I’m a bit confused.

---

<div class="post-metadata">

**Author:** ![lewiso](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/lewiso/32/19666_2.png) [@lewiso](https://community.sonarsource.com/u/lewiso)\
**Post date:** [March 11, 2019, 2:59pm UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/7 "2019-03-11T14:59:16Z")

</div>

> [@Fabrice\_Bellingard](#):
>
> Can you clarify what makes users think that the PR decoration is done through comments instead of checks? The documentation does not mention comments - so I’m a bit confused.

I believe this line is misleading.

> - automatically decorate your PRs with SonarCloud issues in your SCM provider’s interface.

It certainly led me to believe that the GitHub plugin operated in the previous way where each issue showed in-line with the code.

I looked into the GitHub checks feature to see if I should complain to them, but I shouldn’t as GitHub Checks already supports “Annotations” which achievs this. Their Hello World example shows this: [Building CI checks with a GitHub App - GitHub Docs](https://developer.github.com/apps/quickstart-guides/creating-ci-tests-with-the-checks-api/#step-24-collecting-rubocop-errors)

Have you migrated to GitHub annotations, or is it an error in my configuration that means I am not seeing annotations/inline decorations?

---

<div class="post-metadata">

**Author:** ![Fabrice\_Bellingard](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/fabrice_bellingard/32/39_2.png) [@Fabrice\_Bellingard](https://community.sonarsource.com/u/Fabrice_Bellingard)\
**Post date:** [March 14, 2019, 9:00am UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/8 "2019-03-14T09:00:17Z")

</div>

> [@lewiso](#):
>
> Have you migrated to GitHub annotations, or is it an error in my configuration that means I am not seeing annotations/inline decorations?

I guess you might have missed the following part in [PR analysis results are now displayed in the Checks tab of Pull Requests in GitHub](https://community.sonarsource.com/t/pr-analysis-results-are-now-displayed-in-the-checks-tab-of-pull-requests-in-github/5870):

> As you will see, we decided for now to not display issues that are discovered in the code of the Pull Request (as well as issues that are not in the code).  
> The reason is that with Checks, we first wanted to use Annotations to display issues. We realised that we would not be able to display in the best way we want the issue information such as the type of the issue (bug, code smell, vulnerability), the severity of the issue and the link to the issue in SonarCloud. You can still retrieve all those information on SonarCloud, via the link.

---

<div class="post-metadata">

**Author:** ![lewiso](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/lewiso/32/19666_2.png) [@lewiso](https://community.sonarsource.com/u/lewiso)\
**Post date:** [March 14, 2019, 9:31am UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/9 "2019-03-14T09:31:43Z")

</div>

> [@Fabrice\_Bellingard](#):
>
> I guess you might have missed the following part in [PR analysis results are now displayed in the Checks tab of Pull Requests in GitHub](https://community.sonarsource.com/t/pr-analysis-results-are-now-displayed-in-the-checks-tab-of-pull-requests-in-github/5870):

Correct, I missed that.

That only makes me more disappointed that you thought about it and chose not to use it. This has quite a negative impact on our workflow.

Like with @Rick-at-KUBRA, this is a key function for us and was part of our selection criteria when we migrated from Codacy. This change puts us in a tough position.

---

<div class="post-metadata">

**Author:** ![Fabrice\_Bellingard](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/fabrice_bellingard/32/39_2.png) [@Fabrice\_Bellingard](https://community.sonarsource.com/u/Fabrice_Bellingard)\
**Post date:** [March 14, 2019, 5:22pm UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/10 "2019-03-14T17:22:12Z")

</div>

> [@lewiso](#):
>
> This change puts us in a tough position.

I’d like to dig into why you think this puts you in a tough position. With the quality gate summary and the links available in the SonarCloud Check page, you get the big picture of the quality of the PR and can get access (through the links) to the complete list of found issues with far more details, explanation and help than what you could get with annotations inside GitHub.

---

<div class="post-metadata">

**Author:** ![Rick-at-KUBRA](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rick-at-kubra/32/1915_2.png) [@Rick-at-KUBRA](https://community.sonarsource.com/u/Rick-at-KUBRA)\
**Post date:** [March 14, 2019, 11:22pm UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/11 "2019-03-14T23:22:10Z")

</div>

@Fabrice_Bellingard I think a simple way to explain it is that ideally you want your developers to stay in a simplistic workflow. I went to [Atlassian’s talk at AWS Re:Invent 2 years ago](https://www.youtube.com/watch?v=PLizuWLpnfY) where they explained how they thought you should use github hooks to push Jira tickets to sequential states so that a developer doesn’t need to interrupt coding to go do that in Jira as a secondary task. In my mind, this is a similar situation where if you tell a smart developers “Hey, there’s a problem in this line of code!”, they may easily identify and fix the problem without the extensive details, explanation, and help at [sonarcloud.io](http://sonarcloud.io) and can then go back to work.

So ideally the plugin would use annotations in the files tab to point to where an issue is occurring AND provide some links (in the annotation or the Checks tab) to help green-er developers get further help in solving the problem.

---

<div class="post-metadata">

**Author:** ![edwagner](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/edwagner/32/3150_2.png) [@edwagner](https://community.sonarsource.com/u/edwagner)\
**Post date:** [March 28, 2019, 9:04pm UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/12 "2019-03-28T21:04:50Z")

</div>

I think @Rick-at-KUBRA captures the argument well.  
It’s fine if you want to move the feedback to the Checks tab, but please add the inline annotations to the check. Even if you can’t format those annotations exactly as you might like, they could still make a huge impact in developer productivity.

(FWIW, this is a significant factor in our evaluation as we choose a tool to adopt.)

---

<div class="post-metadata">

**Author:** ![Fabrice\_Bellingard](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/fabrice_bellingard/32/39_2.png) [@Fabrice\_Bellingard](https://community.sonarsource.com/u/Fabrice_Bellingard)\
**Post date:** [April 3, 2019, 6:57am UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/13 "2019-04-03T06:57:36Z")

</div>

FYI, we’ve been discussing the topic internally for quite some time already. I hope we can find a way to add GitHub Checks Annotations while overcoming their limitations and still keep a good user experience. We’ll keep you posted.

Thanks all for your feedback.

---

<div class="post-metadata">

**Author:** ![queen-of-code](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/queen-of-code/32/4047_2.png) [@queen-of-code](https://community.sonarsource.com/u/queen-of-code)\
**Post date:** [June 20, 2019, 6:27pm UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/14 "2019-06-20T18:27:07Z")

</div>

Just wanted to chime in that our team was HUGELY disappointed to find that the inline annotations were gone. This was a major selling point, and the result is that people now basically don’t know or see if they’ve had violations.

I don’t mind having the summary results in the Checks tab, but missing the inline annotations for individual violations is a very significant regression for our PR workflow.

---

<div class="post-metadata">

**Author:** ![Fabrice\_Bellingard](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/fabrice_bellingard/32/39_2.png) [@Fabrice\_Bellingard](https://community.sonarsource.com/u/Fabrice_Bellingard)\
**Post date:** [June 28, 2019, 8:21am UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/15 "2019-06-28T08:21:14Z")

</div>

This is something we’ll be adding hopefully soon.

---

<div class="post-metadata">

**Author:** ![Fox32](https://avatars.discourse-cdn.com/v4/letter/f/7c8e57/32.png) [@Fox32](https://community.sonarsource.com/u/Fox32)\
**Post date:** [July 12, 2019, 8:33am UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/16 "2019-07-12T08:33:56Z")

</div>

We are currently evaluating to move from our self hosted SonarQube (with the GitHub plugin) to SonarCloud.  
We were quite disappointed that the comments are gone. Back in the time before we used the comments we noticed that most developers were not taking much interest into the scan results, only if there were severe errors. Once we had the comments, the people started to fix much more issues and showed a lot more interest.

> [@Fabrice\_Bellingard](#):
>
> This is something we’ll be adding hopefully soon.

We are very interested in the inline annotations! Is there some kind of roadmap for the SonarCloud customers available?

---

<div class="post-metadata">

**Author:** ![Fabrice\_Bellingard](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/fabrice_bellingard/32/39_2.png) [@Fabrice\_Bellingard](https://community.sonarsource.com/u/Fabrice_Bellingard)\
**Post date:** [July 12, 2019, 2:15pm UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/17 "2019-07-12T14:15:14Z")

</div>

Update on this thread.

We’ve recently spent some time looking again at this ([MMF-1535](https://jira.sonarsource.com/browse/MMF-1535)), and we were again disappointed by the poor user experience that those annotations bring. By the way, GitHub Checks and its annotations are still declared as _“Preview features [that] are not supported for production use”_: this is not surprising that no code quality service is currently relying on annotations.

> [@Fox32](#):
>
> Back in the time before we used the comments we noticed that most developers were not taking much interest into the scan results, only if there were severe errors. Once we had the comments, the people started to fix much more issues and showed a lot more interest.

There is a very powerful yet simple way to force developers to take care about issues found by SonarCloud: you enforce a green SonarCloud status on the PR to allow the merge.

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

---

<div class="post-metadata">

**Author:** ![ms1111](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ms1111/32/42759_2.png) [@ms1111](https://community.sonarsource.com/u/ms1111)\
**Post date:** [July 12, 2019, 2:57pm UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/18 "2019-07-12T14:57:09Z")

</div>

Hi Fabrice,

Thanks for the update.

> [@Fabrice\_Bellingard](#):
>
> There is a very powerful yet simple way to force developers to take care about issues found by SonarCloud: you enforce a green SonarCloud status on the PR to allow the merge.

I think we’d get a lot of resistance on this; I myself wouldn’t enjoy it. We use SonarCloud to make our code review process easier. It was great when it was putting inline comments on PRs, basically saving reviewers tons of work commenting on basic things so we could focus on overall design. Also, code smells are not always blocking the quality gate ([Log in with Atlassian account](https://jira.sonarsource.com/browse/MMF-1612)) but we still want people to see them.

Currently as a reviewer I have to use both the GitHub and SonarCloud UIs, and most reviewers don’t remember the SonarCloud part.

(Also, not every issue Sonar finds is real, and I don’t want to force developers to go outside GitHub to click “false positive” or “won’t fix” on every issue.)

We really miss the old behaviour where SonarCloud would put inline comments on code issues. (The only painful part of it was it was doing each comment individually, so we’d get dozens of e-mails for each PR instead of a single e-mail with all comments. If there’s a batch API it would probably improve things.)

I’m sorry to hear the checks/annotations API doesn’t provide a good experience. Unfortunately, without inline PR comments of some sort, SonarCloud is barely helping us at all. It’s too hard to have two streams of code review (GitHub + SonarCloud UI).

Best,  
Mike

---

<div class="post-metadata">

**Author:** ![ms1111](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ms1111/32/42759_2.png) [@ms1111](https://community.sonarsource.com/u/ms1111)\
**Post date:** [July 12, 2019, 3:18pm UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/19 "2019-07-12T15:18:38Z")

</div>

I was curious so I took a look around at what some other code quality tools do with GitHub PRs.

- Codacy: Adds inline comments and a summary commit, like Sonar used to do: [https://support.codacy.com/hc/en-us/articles/207280219-GitHub-Integration](https://support.codacy.com/hc/en-us/articles/207280219-GitHub-Integration)
- CodeClimate: Adds inline comments and a summary commit with a nice table - [https://docs.codeclimate.com/docs/github-pull-requests](https://docs.codeclimate.com/docs/github-pull-requests)
  - Also has a browser extension you could use to display issues inline in the GitHub UI without actually creating PR comments. [https://codeclimate.com/browser-extension/](https://codeclimate.com/browser-extension/)
  - I find most developers don’t proofread their own PRs, so an extension would not be as useful as real inline PR comments, in my opinion

- Codebeat: Doesn’t seem to put inline comments on PRs: [https://hub.codebeat.co/docs/pull-requests](https://hub.codebeat.co/docs/pull-requests)

---

<div class="post-metadata">

**Author:** ![Fabrice\_Bellingard](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/fabrice_bellingard/32/39_2.png) [@Fabrice\_Bellingard](https://community.sonarsource.com/u/Fabrice_Bellingard)\
**Post date:** [July 16, 2019, 7:24am UTC](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371/20 "2019-07-16T07:24:14Z")

</div>

Hi Michael, thanks for your inputs on this. To be clear, we would prefer to be able to use annotations.

> [@ms1111](#):
>
> Unfortunately, without inline PR comments of some sort, SonarCloud is barely helping us at all. It’s too hard to have two streams of code review (GitHub + SonarCloud UI).

If you know other code quality online services which use annotations, I’d be really happy to take a look at what they do.

[Next page](https://community.sonarsource.com/t/sonarcloud-github-pull-request-analysis-no-inline-comments/7371.md?page=2)
