AmadeusITGroup / sonar-stash

Stash (BitBucket) plugin, a pull-request decorator which allows to integrate SonarQube violations directly into your pull-request
MIT License
165 stars 82 forks source link

Old and New Issues in Pull Request Analysis #155

Closed hax0rdlux3 closed 6 years ago

hax0rdlux3 commented 6 years ago

Hello,

We have a workflow as follows:

we create a feature branch off 'main' for a sprint -> feature/sprint1 for example. Dev works on it locally and pushes to BitBucket and a creates new PR; At this point we run sonar with sonar-stash w/the following invocation:

$ sonar-scanner -Dsonar.analysis.mode=preview -Dsonar.stash.notification=true -Dsonar.stash.project=stat -Dsonar.stash.include.existing.issues=false -Dsonar.stash.repository=StaticAnalysisPOC -Dsonar.stash.pullreque st.id=5

We view results in BitBucket and find both the 'legacy' (pre-existing from main branch we created our feature branch from);

any assistance is appreciated.

SonarQube version: Version 6.5 (build 27846)

BitBucket version: 4.8

t-8ch commented 6 years ago

Can you confirm that you have ran a normal, full scan on the master branch before? The analysis will find new issues since the last successful, full scan.

hax0rdlux3 commented 6 years ago

ah... excellent point... let me verify

t-8ch commented 6 years ago

@hax0rdlux3 Do you have any news?

hax0rdlux3 commented 6 years ago

Yes, sorry for the delay. We got everything working... I have a few other questions but to accomplish what I needed to do, I had to understand the workflow better, which included the running of a scan on my 'Master' (main) branch from which I created the feature branch and subsequently the PR. It works as intended.

Drimix20 commented 5 years ago

How you got everything working please? We have similar issue. We are performing analysis on our main branch (named devel-master), put all issues are detected in pull requests instead of few of them which are really newly introduced.

t-8ch commented 5 years ago

@Drimix20 Are the settings for both types of scans compatible (most importantly the project key)?