-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support SonarQube 10.x #2616
Support SonarQube 10.x #2616
Conversation
- CI is testing with SQ 9.9 LTS and SQ 10.3 with Java 17 - use SonarQube 10.3.0.82913 for testing - use SonarScanner 5.0.1.3006 for testing - pom.xml: use Java 17 as default (Java 11 no more supported)
….15.0.435 Refactor the code to use new artifact sonar-plugin-api-test-fixtures.
Get rid of deprecated LoggerLevel.
…0.3.0.1951 And bump also org.sonarsource.api.plugin:sonar-plugin-api-test-fixtures Some classes move to org.sonar.api.testfixtures.measure package.
… to 10.3.0.82913 And bump org.sonarsource.sonarqube:sonar-testing-harness
Hi @agebert, thanks a lot. The CI is failing with SQ 10.3: Failing scenarios: I have to look deeper into it what the reason is. Regards, |
@agebert small question: are you using the plugin in your SQ 10.3 environment successful? |
@guwirth no, I did not test it at all. I only run the "mvn verify". We are new to SonarQube and picked SonarQube 10.x because it is faster than SonarQube 9.x for our setup. With SonarQube 10.3 we failed to use sonar-cxx 2.1 as explained on Compatibility-Matrix. On the other hand we downgraded to SonarQube 10.0, and this works with sonar-cxx 2.1. Thank you and all contributes for this project. It is fun to work with you @guwirth. |
Seems to be changes in the WebApi so that tests are no more running. |
Can I help with something? |
Hi @agebert, below the failing API requests:
These two API calls are failing:
Maybe API does no more exist or they changed the parameters? If you have time you can look into the documentation if you find something. Regards, |
The call /api/measures/component does no longer support query paramter metricKeys=directoriesi. This request curl 'http://localhost:9000/api/measures/component?component=smoketest_project&metricKeys=ncloc,lines,statements,classes,files,directories,functions,comment_lines_density,comment_lines,duplicated_lines_density,duplicated_lines,duplicated_blocks,duplicated_files,complexity,cognitive_complexity,file_complexity,violations,lines_to_cover,coverage,line_coverage,branch_coverage,uncovered_conditions,uncovered_lines,tests,test_failures,test_errors,skipped_tests,test_execution_time,test_success_density,false_positive_issues,open_issues,confirmed_issues,reopened_issues,code_smells,sqale_index,sqale_debt_ratio,bugs,reliability_remediation_effort,vulnerabilities,security_remediation_effort,security_hotspots' returned error 404 with body: {"errors":[{"msg":"The following metric keys are not found: directories"}]}
Change in SonarQube 10.0 for /api/rules/create: Drop deprecated keys: 'custom_key', 'template_key', 'markdown_description', 'prevent_reactivation' The parameter names changed. custom_key -> customKey template_key -> templateKey markdown_description -> markdownDescription We got for example this error: {"errors":[{"msg":"The markdownDescription parameter is missing"}]}
I fixed the failing tests:
If I run it local I get this result:
Details of the failed test
I don't know how-to fix this. |
Hi @agebert, thanks for fixing the integration test.
Looks like the two rules are not activated on your local machine?
Do you have the corresponding rights on the server to change rule settings? Regards, |
Hi @agebert, build is running on CI There is still a problem with CodeQL using the wrong Java version. actions/setup-java missing in https://github.com/SonarOpenCommunity/sonar-cxx/blob/master/.github/workflows/codeql-analysis.yml. I will add the JAR files to the Releases as a beta so that others also can use it with SQ 10. Regards, |
merged into branch SQ-10 and release as a first V2.2-beta |
@guwirth thank you for merging and creating a beta version. |
The goal is to support SonarQube 10.x. It is based on #2613 and supersedes #2612.
With these changes you can use 10.x version of org.sonarsource.sonarqube:sonar-plugin-api-impl and
org.sonarsource.api.plugin:sonar-plugin-api .
I fixed all compile issues for new plug-in https://sonarsource.atlassian.net/browse/SONARTEXT-57 and Java 17.
I did not test the result.
Sorry for creating a new PR, but I wanted to rebase on top of #2613 and do not know how-to do this with an existing #2612.
This change is