sonarqube-scan

SonarQube Jenkins/git integration when cloning to a subdirectory

一笑奈何 提交于 2020-07-19 05:20:08
问题 I have Jenkins' git plug-in clone my repository to a subdirectory of WORKSPACE . Accordingly, I set sonar.sources=my/subdir SCM detection doesn't seem to be informed by the above setting, however; and setting sonar.scm.provider=git …yields: ERROR: Not inside a Git work tree: /path/to/my/workspace How do I inform SonarQube's git plug-in of the location of my sources? (And why isn't it clever enough to use sonar.sources ?) 回答1: struggled with this for a full 5 hours. thougt i should share what

SonarQube Scanner fails with “Not inside a git worktree” error

雨燕双飞 提交于 2020-07-10 10:29:17
问题 I'm using Travis CI to run SonarQube Scanner on a C# project. I've managed to get the scanner to work once but it failed with no obvious reason on the next commit (the commit updated README.md ). I've tried to clear the build cache, with no success. I've also read about the issue in other programming languages (Java mainly) but no luck so far. Error log The specific error is: Not inside a Git work tree: /home/travis/build/presque-fini The full error log is below: 34.72s$ mono ./scanner

SonarQube Scanner fails with “Not inside a git worktree” error

丶灬走出姿态 提交于 2020-07-10 10:28:09
问题 I'm using Travis CI to run SonarQube Scanner on a C# project. I've managed to get the scanner to work once but it failed with no obvious reason on the next commit (the commit updated README.md ). I've tried to clear the build cache, with no success. I've also read about the issue in other programming languages (Java mainly) but no luck so far. Error log The specific error is: Not inside a Git work tree: /home/travis/build/presque-fini The full error log is below: 34.72s$ mono ./scanner

Method does not presize the allocation of a collection

泪湿孤枕 提交于 2020-07-03 05:06:49
问题 Sonar shows that me this bug Performance - Method does not presize the allocation of a collection Method mapping(ResponseEntity) does not presize the allocation of a collection Here is the code: private Set<ResponseDTO> mapping(ResponseEntity<String> responseEntity) { final Set<ResponseDTO> result = new HashSet<>(); final JSONObject jsonObject = new JSONObject(responseEntity.getBody()); final JSONArray jsonArray = jsonObject.optJSONArray("issues"); for (int i = 0; i < jsonArray.length(); i++)

Authenticate sonarScanner via basic auth

一世执手 提交于 2020-02-12 05:03:09
问题 I'm frustrated with this problem, Our sonarqube server is behind http basic authentication and local runner fails with 401 error. Is it somehow possible to provide credentials to it? AOfficial docs shows how to provide sonarqube's internal user... http://www.it1me.com/it-answers?id=35790175&s=User%20talk:Omotecho&ttl=Authenticate+sonar- runner+via+basic+auth any idea or experiences about it? 回答1: The permission "Execute Analysis" is required to execute an analysis. In order to set credential

The SonarQube MSBuild integration failed - SonarQube 7 with Scanner 4.0.2.892 and VS2017

天大地大妈咪最大 提交于 2020-02-02 14:08:46
问题 I'm using SonarQube 7.0 and SonarQube Scanner for MSBuild 4.0.2.892 and attempting to follow these instructions to scan my .NET application on Windows (ASP.NET Core). The three commands below are part of the instructions: C:\SonarQube\Scanner\SonarQube.Scanner.MSBuild.exe begin /k:"org.sonarqube:sonarqube-scanner-msbuild" /n:"TradingPlatform" /v:"1.0" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" /t:Rebuild C:\SonarQube\Scanner\SonarQube.Scanner

Treat Warnings as Errors using SonarQube Analysis

你离开我真会死。 提交于 2020-01-25 09:22:26
问题 I have been trying to make my solution fail to build on Visual Studio Team Services when there are warnings. I have enabled the option in the project in VS2017 to treat warnings as errors, so that it won't build. Treat warnings as errors set to All Also, there is a MsBuild argument for the same purpose set to true on VSTS. Treat warnings as errors set to true This works, as when there is a warning it is treated as error (Eg. an unused int is a warning and becomes an error, failing the build).

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar (default-cli)

佐手、 提交于 2020-01-25 03:42:27
问题 I installed Sonar PMD plugin and after which i am getting the following error: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar (default-cli) on project bpm-parent: Execution default goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar failed: An API incompatibility was encountered while executing org.sonarscanner.maven:sonar-maven-plugin:3.0.1:sonar: java.lang.NoSuchMethodError: org.sonar.plugins.java.api.JavaResourceLocator.classpath()Ljava

tmatesoft.svn.core.SVNAuthenticationException: svn: E170001

久未见 提交于 2020-01-23 06:33:28
问题 We are working n a legacy project (maven) to setup devop. Starter with jenkins. Jenkins build is now without issues. But, while integrating sonarqube with jenkins, we are getting the following error: ERROR: Error during SonarQube Scanner execution java.lang.IllegalStateException: Error when executing blame for file src/main/java/com/acme/acq/scavenger/AssetCmboItem.java at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:100) at org.sonar.plugins.scm.svn.SvnBlameCommand