Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

Warning: sonar.analysis.mode=issues is deprecated #182

Open
datasmurfen opened this issue May 23, 2018 · 10 comments
Open

Warning: sonar.analysis.mode=issues is deprecated #182

datasmurfen opened this issue May 23, 2018 · 10 comments

Comments

@datasmurfen
Copy link

[WARNING] The use of the issues mode (sonar.analysis.mode=issues) is deprecated. This mode will be dropped in the future.

Please consider to replace, or find another way to handle this in next version.

@t-8ch
Copy link
Contributor

t-8ch commented May 23, 2018

Hi @datasmurfen, which version and edition of SQ are you using?
In general SonarSource is trying to move users to it's own Branch Plugin, with which sonar-stash is incompatible. It may very well be that sonar-stash will have no non-deprecated of operation.

Also, please try to resolve questions that can be solved by reading the SQ docs and trying different settings yourself. If the solution could be relevant for different users (like this issue) feel free to document it here.

@manuc66
Copy link

manuc66 commented Jul 20, 2018

I'm using sonar-stash 1.4.0 with SonarQube Server 7.2.0.13530 and Branch analysis feature from developer edition. I do have a warning but it doesn't currently prevent this plugin to work:

WARN: The use of the issues mode (sonar.analysis.mode=issues) is deprecated. This mode will be dropped in the future.

@t-8ch
Copy link
Contributor

t-8ch commented Jul 21, 2018

@manuc66 so you have both the sonar-stash report on the PR and the branch analysis inside the SQ web frontend from a single sonar scanner run?

@manuc66
Copy link

manuc66 commented Jul 21, 2018

@t-8ch With TeamCity I managed to configure it to build branches and pull requests (which are kind of hidden branches that contains the target branch source and the incoming changes). The branch build publish for SonarQube and the pull-request build use sonar-stash.

Wen a new branch is published or updated a build start and publish its result too the corresponding branch on SonarQube web frontend. Once the pull request is created a new build start as well as every time a new commit is published to the pull-request or the target branch changes.

This has the "drawback" of triggering two builds if a new commit is published to a branch that is involved in a pull-request, but those two builds do not build/asse the same things.

Here is the run script:

SONAR_PR=""
if [[ $BRANCH == "pull-requests"* ]] ;
then
    PR_ID=`echo $BRANCH | sed 's/pull-requests\///g'`
    SONAR_PR="-Dsonar.analysis.mode=issues -Dsonar.stash.notification=true -Dsonar.stash.project=%bitbucket.project% -Dsonar.stash.repository=%MODULE_NAME% -Dsonar.stash.pullrequest.id=$PR_ID -Dsonar.stash.password=%BITBUCKET_PASSWORD%"
fi

SONAR_BRANCH=""
if [[ $BRANCH != "master" ]] ;
then
    SONAR_BRANCH="-Dsonar.branch.target=master -Dsonar.branch.name=$BRANCH"
fi

./sonar-scanner -Dsonar.host.url=%sonar.host.url% -Dsonar.login=%sonar.login% $SONAR_BRANCH $SONAR_PR

@t-8ch t-8ch changed the title sonar.analysis.mode=issues) is deprecated Warning: sonar.analysis.mode=issues is deprecated Jul 23, 2018
@t-8ch
Copy link
Contributor

t-8ch commented Jul 23, 2018

@manuc66 Can you confirm that you can see the branch in the branch selection UI as seen in the screenshot? I was not aware that sonar.analysis.mode=issues would show up there.
I will test it myself too soon.

screenshot

@manuc66
Copy link

manuc66 commented Jul 23, 2018

I can confirm that I see branches:
image
but bear in mind that in my setup those branches are not published with the sonar-stash run

@t-8ch
Copy link
Contributor

t-8ch commented Jul 23, 2018

@manuc66 Their was the incompatibility I was referring to previously. You can either use sonar-stash or the branch plugin on a single build.
The pure installations should be compatible though.

@szpak
Copy link

szpak commented Apr 1, 2019

It has been finally removed in SonarQube 7.7. Some alternative should be a paid Developer Edition, but it definitely doesn't support GitLab and most likely also Stash (I haven't found any related information in their documentation. As I understood correctly without that mode it is problematic to keep this plugin functional in 7.7+.

Update. I've just found the "Important note" added in README...

@szpak
Copy link

szpak commented Apr 1, 2019

That's somehow sad that they kill that feature without bringing instead (even for paid customers)...

@t-8ch
Copy link
Contributor

t-8ch commented Apr 1, 2019

Sonarqube 7.7 removed the end this plugin was using, so in its current form it has no chance of working there. (This is also documented in the Readme.)
Otoh the new versions support bitbucket cloud and server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants