Error during Sonar Scanner execution running Tibco project - sonarqube

Must-share information (formatted with Markdown):
SonarQube (9.5.0.56709), Scanner (4.7.0.2747) Tibco project
Hello, When running Sonar on the latest accessible version (9.5) with Sonar Scanner version (4.7), I encountered the following error:
enter image description here
As we can see in the image, this happens when the CheckRules are being validated.
In highlight we see that the error is caused by the fact that the execution is set with the initial interval equal to the final one (12,97). In previous versions of Sonar this was not a problem
I have tried many searches in the web and came up empty, this is basicly my last resource.
enter image description here
I managed this workAround but obviously this cant stay like this.
My gratitude in advance for your time and sugestions

Related

Azure Devops maven build failing at sonar qube instance

I recently downloaded the SonarQube demo from Devops official page. I used it a little bit and kind of left it there for a week.
No changes were made but when I came back today for showing how the sonarQube pipeline integration works, build fails.
From the logs, I see the following error
Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project myshuttle: Not authorized. Please check the properties sonar.login and sonar.password
From there I tried adding username and password at the Prepare analysis for sonar Qube stage om advanced options (which was not necessary before) but the build keeps failing.
I think sonarQube was updated recently and the problem may be there. Issue is still weird because im following word by word the steps on setting up a sonarQube scan.
Any idea on what could be going on?
You may need to update your sonarQube service connection.
You can go to your Project settings and click the Service Connections under Pipelines.
Select your sonarqube connection and click update service connection under Actions, Recopy your SonarQube Token and click Ok. Please refer to below screenshot.

getting trouble to generate sonar test report

I am using sonarqube on my windows server, and it is working find from my client PCs, now I need to generation sonar test report in form of file, pdf, html or in any format to display it to my client. I tried but am not getting any solution, would you please help me, that how to export sonar test report from sonarqube server.
You're not finding that "report export" feature because SonarQube is about continually monitoring the evolution of your code, not printing out a point in time and pinning it to the wall.
If you really have to have something like this, then screenshots are the easiest way to go. Alternately, you can pull current state data using web services and build your own report.

Generating sonar report for 5.2

My requirement is to run jenkins job that will invoke sonar analysis.
This was achieved.
Now all I want is to generate a PDF report and send that report through email.
On analysis, I came across "sonar-report-plugin" to achieve this.
As per the below documentation, i need to run "sonar-runner report" command to achieve the desired result.
but for sonar 5.2 Tasks are no more supported on batch side so the above command fails to execute and just running the "sonar-runner" does not generate the PDF on the specified dashboard.
The documentation i refereed to is "http://www.sonarsource.com/products/plugins/governance/report/installation-and-usage/"
please advise what can i do to get the required result.
The PDF Report plugin is not compatible with SonarQube 5.2 (see Plugin Version Matrix and issue to resolve problems with 5.1) and is marked as deprecated (see Deprecated Plugins):
PDF Report - Generates PDF report from project analysis. Note that
report is not configurable and cannot be sent by email and the plugin
is limited to Java Maven projects.

Sonar preview mode all new issues

I am trying to run SonarQube using Sonar runner in local dev box for pre-commit check. We have a central SonarQube server where a analysis is done every day and published to the dashboard. When we are running on local dev box everytime the the issue report contains all the issues as new hence incremental data is not available. I have also tried both incremental and preview mode but the result is some.
Please find below the version of the tools used.And also configuration files. Please let me know if some other data is required.
SonarQube version : 5.1
Sonar Runner version : 2.4
sonar-runner.properties
sonar.host.url=http://[central sonar server]:9000/
sonar.issuesReport.html.enable=true
sonar.login=admin
sonar.password=admin
sonar-project.properties
sonar.projectKey=myProj:myProj-master
sonar.projectName=MASTER_PROJECT
sonar.projectVersion=21.0
sonar.sources=./src
sonar.binaries=./bin/
sonar.issuesReport.html.enable=true
sonar.exclusions=com/**/test/*.java
sonar.skipPackageDesign=true
sonar.profile=SonarWay
sonar.preview.excludePlugins=devcockpit,buildstability,pdfreport,report,buildbreaker,views,jira,issueassign,scmstats
Command Used :
c:\sonar-runner-dist-2.4\sonar-runner-2.4\bin\sonar-runner -e -Dsonar.analysis.mode=preview -Dsonar.issuesReport.console.enable=true -Dsonar.issuesReport.html.enable=true
Updated with additional properties tried as well. in sonar-runner.properties
I believe your problem is tied directly to your use of a local server.
The purpose of preview analysis is to allow you to compare your local changes with what's on the remote SonarQube server. Since your remote server is update every night, running your preview against it will show you the issues you've introduced that day. Instead, you're running against a local instance which gets updated with a full analysis... never? Which (if true) would be why all your issues show up as new.
To execute a preview analysis against your remote server, you will need both the global Execute Preview Analysis permission and the project-level Browse permission for the project in question.
If for some reason you're unable to get those permissions (which is possibly why you're running a local SonarQube server?) Then you'll want to do the same full checkout and analysis locally every night that's being done for the official, remote server. I.e. you'll probably have to set up a second, parallel architecture. In short, it's probably easier in the long run to nag to get the appropriate permissions on the remote server.
Issue is resolved . 2 things fixed the issue.
Creating a user with the required permissions.
Installing "Issues Report" plugin

Sonar in Maven build stopped working

I had a project built with maven on a Jenkins CI server, and recently the Sonar portion of the build began to fail with the well known
org.sonar.core.persistence.BadDatabaseVersion: Database must be upgraded. Please browse http://x.x.x.x:9000/setup
I browsed to http://x.x.x.x:9000/setup, and the message there was green and said my database was up to date. The database looks good and the sonar server doesn't throw any Exceptions as far as I can tell from the output, and this installation had been working well up until a few days ago.
I checked that the id was the same between the running server and the database, and insured that only one instance of Sonar was talking to the H2 DB.
My next step is to step through Sonar code, which I'm not eager to do. Any pointers as to what's wrong would be appreciated.
Thanks.
Your Maven plugin version is probably not aligned with your Sonar install.

Resources