sonarqube

sonarqube 6.3 error could-not-complete-symbolic-execution-reached-limit-of-16000 steps

谁都会走 提交于 2021-02-20 18:48:34
问题 We have a scan that aborts on the code below, with the exception: org.sonar.java.se.ExplodedGraphWalker$MaximumStepsReachedException: reached limit of 16000 steps for method getServiceProviders#151 in class ServiceProviderService We looked at rules S2259 and S2583 and would like to keep notifications about null pointers. This happens in both "regular" and debug (-X) mode, so it's not issue 1406. In our case it really seems to be related to try/catch. (See sample method below.) Could it be a

sonarqube 6.3 error could-not-complete-symbolic-execution-reached-limit-of-16000 steps

泄露秘密 提交于 2021-02-20 18:47:14
问题 We have a scan that aborts on the code below, with the exception: org.sonar.java.se.ExplodedGraphWalker$MaximumStepsReachedException: reached limit of 16000 steps for method getServiceProviders#151 in class ServiceProviderService We looked at rules S2259 and S2583 and would like to keep notifications about null pointers. This happens in both "regular" and debug (-X) mode, so it's not issue 1406. In our case it really seems to be related to try/catch. (See sample method below.) Could it be a

How to SuppressWarnings for 'common-java' rules

北城余情 提交于 2021-02-19 00:45:29
问题 I need to temporary ignore rule "Insufficient branch coverage by unit tests" (common-java:InsufficientBranchCoverage). Reading http://docs.sonarqube.org/display/SONAR/Frequently+Asked+Questions I see that SuppressWarnings should work for all rules. But any combination of @SuppressWarnings("common-java:InsufficientBranchCoverage") @SuppressWarnings("InsufficientBranchCoverage") @SuppressWarnings("java:InsufficientBranchCoverage") does not work for me. I use Sonar 5.0, Sonar Java plugin 3.0.

How to SuppressWarnings for 'common-java' rules

倖福魔咒の 提交于 2021-02-19 00:45:27
问题 I need to temporary ignore rule "Insufficient branch coverage by unit tests" (common-java:InsufficientBranchCoverage). Reading http://docs.sonarqube.org/display/SONAR/Frequently+Asked+Questions I see that SuppressWarnings should work for all rules. But any combination of @SuppressWarnings("common-java:InsufficientBranchCoverage") @SuppressWarnings("InsufficientBranchCoverage") @SuppressWarnings("java:InsufficientBranchCoverage") does not work for me. I use Sonar 5.0, Sonar Java plugin 3.0.

Split async method into two for code analysis?

血红的双手。 提交于 2021-02-16 10:52:07
问题 I have code: public async Task DeleteColorSchemeAsync(ColorScheme colorScheme) { if (colorScheme == null) throw new ArgumentNullException(nameof(colorScheme)); if (colorScheme.IsDefault) throw new SettingIsDefaultException(); _dbContext.ColorSchemes.Remove(colorScheme); await _dbContext.SaveChangesAsync(); } One code analyzer recommends me to split this method to 2 methods: Split this method into two, one handling parameters check and the other handling the asynchronous code Am I correct,

Jenkins PHP Unit Test and Code Coverage unable to import in SonarQube

两盒软妹~` 提交于 2021-02-11 15:37:23
问题 I have been struggling with importing unit test results and code coverage from Jenkins into SonarQube. At this point, I have verified the results are being generated as they are displayed in the project's page in Jenkins. The sonar.properties file is shown below. The php results were created with phpunit and the code coverage was created with phpunit and clover. As an effort in troubleshooting, I included both sonar.php.coverage.reportPath and sonar.clover.reportPath. sonar.projectKey

Jenkins PHP Unit Test and Code Coverage unable to import in SonarQube

℡╲_俬逩灬. 提交于 2021-02-11 15:37:16
问题 I have been struggling with importing unit test results and code coverage from Jenkins into SonarQube. At this point, I have verified the results are being generated as they are displayed in the project's page in Jenkins. The sonar.properties file is shown below. The php results were created with phpunit and the code coverage was created with phpunit and clover. As an effort in troubleshooting, I included both sonar.php.coverage.reportPath and sonar.clover.reportPath. sonar.projectKey

SonarQube combines analysis report of various applications under a single report

試著忘記壹切 提交于 2021-02-11 15:12:09
问题 I have integrated SonarQube via Jenkins for various applications. We have separate visual studio solutions for different applications. Somehow SonarQube combines analysis report for various applications under a single report. How can I generate separate report for each application? I have the following properties to run Sonar analysis via Jenkins. sonar.projectKey=SONAR_TEST sonar.projectName=SONAR_TEST sonar.projectVersion=1.0 sonar.sources=C:/$Application_Name (Note: $Application_Name is

SonarQube combines analysis report of various applications under a single report

你说的曾经没有我的故事 提交于 2021-02-11 15:06:30
问题 I have integrated SonarQube via Jenkins for various applications. We have separate visual studio solutions for different applications. Somehow SonarQube combines analysis report for various applications under a single report. How can I generate separate report for each application? I have the following properties to run Sonar analysis via Jenkins. sonar.projectKey=SONAR_TEST sonar.projectName=SONAR_TEST sonar.projectVersion=1.0 sonar.sources=C:/$Application_Name (Note: $Application_Name is

Set the build unstable if sonar Quality Gate is failed

守給你的承諾、 提交于 2021-02-11 14:44:21
问题 I have a very simple pipeline. Everything is defined in my pom.xml files and .m2/settings.xml. I want to set my build as instable on Jenkins when SonarQube's Quality Gate is failed. Here is what I did but I have several errors like "expected }". Does anyone know how it works ? Note that the environment part is optional. Thank you. pipeline { agent { label "master" } tools { // Note: this should match with the tool name configured in your jenkins instance (JENKINS_URL/configureTools/) maven