[ 
https://issues.apache.org/jira/browse/HIVE-26196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17577476#comment-17577476
 ] 

Alessandro Solimando edited comment on HIVE-26196 at 8/9/22 4:00 PM:
---------------------------------------------------------------------

I think you mean something like this [~zabetak]: 
[https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-maven/] ? 
Basically there are information that need to be added at the pom level (maven 
sonar plugin and optionally some parameters which can also be passed to mvn via 
command line), the rest goes to the mvn command invocation as described in the 
guide.

For what concerns jacoco the story is a bit more complicated and for projects 
with many submodules like Hive it's not straightforward how to set it up, will 
cover that in a follow-up ticket.

EDIT: some more info on the SonarCloud part:
 * [https://sonarcloud.io/project/roles?id=apache_hive] <-- user permissions 
can be set here (it will be important to add at least all active committers 
here to mark false positives for reviews)
 * [https://sonarcloud.io/project/quality_gate?id=apache_hive] <-- quality gate 
can be set here among existing quality gates, if creating a new one is needed 
you need to contact infra (see INFRA-23557)
 * I had to add a sonar token to hive ci

This is all it took to get it up and running as it is now


was (Author: asolimando):
I think you mean something like this [~zabetak]: 
[https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-maven/] ? 
Basically there are information that need to be added at the pom level (maven 
sonar plugin and optionally some parameters which can also be passed to mvn via 
command line), the rest goes to the mvn command invocation as described in the 
guide.

For what concerns jacoco the story is a bit more complicated and for projects 
with many submodules like Hive it's not straightforward how to set it up, will 
cover that in a follow-up ticket.

> Integrate Sonar analysis for the master branch and PRs
> ------------------------------------------------------
>
>                 Key: HIVE-26196
>                 URL: https://issues.apache.org/jira/browse/HIVE-26196
>             Project: Hive
>          Issue Type: Improvement
>          Components: Build Infrastructure
>    Affects Versions: 4.0.0-alpha-2
>            Reporter: Alessandro Solimando
>            Assignee: Alessandro Solimando
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> The aim of the ticket is to integrate SonarCloud analysis for the master 
> branch and PRs.
> The ticket does not cover test coverage at the moment (it can be added in 
> follow-up tickets, if there is enough interest).
> From preliminary tests, the analysis step requires 30 additional minutes for 
> the pipeline, but this step is run in parallel with the test run, so the 
> total end-to-end run-time is not affected.
> The idea for this first integration is to track code quality metrics over new 
> commits in the master branch and for PRs, without any quality gate rules 
> (i.e., the analysis will never fail, independently of the values of the 
> quality metrics).
> An example of analysis is available in the ASF Sonar account for Hive: [PR 
> analysis|https://sonarcloud.io/summary/new_code?id=apache_hive&pullRequest=3254]
> After integrating the changes, PRs will also be decorated with a link to the 
> analysis to be able to better evaluate any pain points of the contribution at 
> an earlier stage, making the life of the reviewers a bit easier.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to