sonarqube

SonarQube Local Script in IntelliJ can't find mvn (IOException/No such directory)

空扰寡人 提交于 2019-12-21 02:58:10
问题 My maven build works fine in IntelliJ IDEA. That is not the issue. The issue is relating to SonarQube Community Plugin. ERROR 17:08:38.358 > java.io.IOException: Cannot run program "mvn" (in directory "/Users/chrismanning/Projects/Registry/registry/idea-files"): error=2, No such file or directory Local analysis script: mvn sonar:sonar -DskipTests=true -Dsonar.analysis.mode=issues -Dsonar.scm.enabled=false -Dsonar.scm-stats.enabled=false -Dissueassignplugin.enabled=false -Dsonar.preview

How to fail a maven build, if JUnit coverage falls below certain threshold

纵然是瞬间 提交于 2019-12-20 20:01:04
问题 I'm getting the Unit test coverage percentage metric from sonar rest api. How can I fail the build if it falls below a defined value? 回答1: JaCoCo offers that feature. JaCoCo with Configuration rules Define JaCoCo plugin using configuration rules COVEREDRATIO for LINE and BRANCH : <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.7.7.201606060606</version> <executions> <execution> <id>default-prepare-agent</id> <goals> <goal>prepare-agent</goal> <

What does the “leak period” mean in sonarQube?

冷暖自知 提交于 2019-12-20 17:39:57
问题 I'm new in SonarQube I started reading documentation but a lot of time a found "The leak period" but I didn't found anything about it can someone explain me what it means. 回答1: Shortly, leak period is time frame (usually since last release), where specified criteria are measured on newly added code. This allows to focus on quality of fresh code and stop the accumulation of technical debt. The "leak" concept is explained in documentation here https://docs.sonarqube.org/display/SONAR/Fixing+the

Can not execute Findbugs Caused by: This project contains Java source files that are not compiled

前提是你 提交于 2019-12-20 17:28:22
问题 I am currently using the sonarqube server 5.6 with scanner 2.6.1 and I keep getting errors during analysis for a java project. It appears to complain about some java files not compiled in the binaries folder (there aren't any at all in the binaries folder). Once I add the -X parameter I get more exceptions (flagged as ignored), see below. any clues? sonar-project.properties followed by logs sonar.projectKey=myproj sonar.projectName=myproj sonar.projectVersion=1.1 sonar.branch=1.1 sonar

Delete a project from SonarQube

一世执手 提交于 2019-12-20 15:36:28
问题 Does anyone know how to delete a project from a SonarQube server? Thanks, Ronen. 回答1: You have 2 ways to delete a project: If you are an admin of the project, you can delete it from its configuration actions => See "Deleting a project" in the "Project Administration" documentation page If you are a SonarQube administrator, then you can also delete a project from the "Project Management" page => See "Project Management/Project Existence" documentation page 回答2: Updated for Sonar 2.11: Select

Does SonarQube support Java 8 yet?

旧时模样 提交于 2019-12-20 12:31:34
问题 With Java 8, executing gradle sonarRunner shows this error message. (sonarQube version : 4.2.1) java.lang.ArrayIndexOutOfBoundsException: 26721 at org.objectweb.asm.ClassReader.readClass(Unknown Source) [asm-all-3.2.jar:5.0_BETA] at org.objectweb.asm.ClassReader.accept(Unknown Source) [asm-all-3.2.jar:5.0_BETA] at org.objectweb.asm.ClassReader.accept(Unknown Source) [asm-all-3.2.jar:5.0_BETA] at org.sonar.java.bytecode.asm.AsmClassProviderImpl.decoracteAsmClassFromBytecode

Does SonarQube support Java 8 yet?

不问归期 提交于 2019-12-20 12:29:59
问题 With Java 8, executing gradle sonarRunner shows this error message. (sonarQube version : 4.2.1) java.lang.ArrayIndexOutOfBoundsException: 26721 at org.objectweb.asm.ClassReader.readClass(Unknown Source) [asm-all-3.2.jar:5.0_BETA] at org.objectweb.asm.ClassReader.accept(Unknown Source) [asm-all-3.2.jar:5.0_BETA] at org.objectweb.asm.ClassReader.accept(Unknown Source) [asm-all-3.2.jar:5.0_BETA] at org.sonar.java.bytecode.asm.AsmClassProviderImpl.decoracteAsmClassFromBytecode

How do I pass credentials to Sonar API calls?

坚强是说给别人听的谎言 提交于 2019-12-20 10:33:58
问题 When I try to call: https://sonar.mydomain.com/api/resources?resource=com.mydomain.project:MY&metrics=ncloc&format=json I get {"err_code":401,"err_msg":"Unauthorized"} How do I pass my credentials? 回答1: According to the documentation SonarQube uses basic authentication . Try: curl -u admin:SuPeRsEcReT "https://sonar.mydomain.com/api/resources?resource=com.mydomain.project:MY&metrics=ncloc&format=json" Obviously the mechanism for passing these credentials is dependent on how you are invoking

How to integrate sonarqube in android studio?

被刻印的时光 ゝ 提交于 2019-12-20 08:44:46
问题 How we can integrate sonarqube in android studio? I have come across static code analysis using sonarqube. Explain how we can achieve that. There are many link available to integrate sonar-runner and sonarqube but either outdated or not sufficient to get the job done. 回答1: Sonarqube is static code analyzer tool on server side. It is very useful to write clean and quality code. You should have sonarqube running on localhost or server. There create a new project giving name and unique id, this

SonarQube JIRA plugin - how to configure authorization data and what permissions a user needs?

醉酒当歌 提交于 2019-12-20 06:15:05
问题 http://docs.sonarqube.org/display/PLUG/JIRA+Plugin In the above instruction: set the sonar.jira.url , sonar.jira.login.secured and sonar.jira.password.secured properties. It's a JIRA user or SonarQube user, or both? What kind of permission this user needs? 回答1: Jira user Permissions: view project view issues create issue SOAP base URL value is relative to Server URL so you can remove the entered value. 来源: https://stackoverflow.com/questions/33046953/sonarqube-jira-plugin-how-to-configure