sonar-runner

New Msbuild Sonar runner is skipping analysis for .net projects

浪尽此生 提交于 2019-12-08 04:25:56
问题 I have setup new Msbuild sonar runner and kickoff analysis for a project type "class library". It went successful. To test it further, I have created one more project which has only one file with 5 Interface definitions. I made sure that names of interfaces NOT started with letter 'i'. I created a quality profile with one stylecop rule i.e. "Interface names must begin with i". I started cmd prompt (VS command prompt) and change it's path to the directory which has .csproj file. Clearly I am

Sonarqube C# scanner exception: “java.lang.IllegalArgumentException: is not a valid line offset for pointer”

穿精又带淫゛_ 提交于 2019-12-08 02:43:58
问题 Does anyone know what's going on here? Using Sonarqube v5.6 on a windows server, c# scanner v5.5.0.479 Seems to pick this up in multiple files, and not always the same files, which is the most concerning. Anyone have any ideas? 16:46:03 INFO: Importing analysis results from E:\Jenkins\workspace\Job Build-UnitTest (PullRequests)\.sonar\output-cs 16:46:05 INFO: ------------------------------------------------------------------------ 16:46:05 INFO: EXECUTION FAILURE 16:46:05 INFO: --------------

C# analysis fails without .pdb files

你。 提交于 2019-12-07 14:41:45
问题 I'm trying out the new C# plugin v3.0 with SonarQube 4.2. According to plugin documentation, I need .pdb files to run analysis which includes FxCop rules, and indeed I get a failure message when executing sonar-runner if said .pdb files are not present in the output folder; FxCop exits with code 1536. The thing is, the analysis seems to require .pdb files for ALL the binnaries, and the output folder contains several dependencies in addition to my own compiled code. These are NuGet packages

Sonar Runner:- INFO: Could not resolve file paths

孤街醉人 提交于 2019-12-07 11:33:53
问题 I am trying to run Sonar Runner through CMD Line and want to scan all data through my Lcov file but after Running sonar Runner and it's showing Error in reading file .I crossed checked each and every path mentioned in file manually and its working fine.But still It's giving me the error as below:- >INFO: Integration Test Coverage Sensor is started INFO: Overall Coverage Sensor is started INFO: Analysing [C:\Tests\lcov.dat] INFO: Could not resolve 67 file paths in [C:\Trunk\lcov.dat], first

Is it possible to tell Sonar the project name from the command line?

喜你入骨 提交于 2019-12-07 11:10:41
问题 With each project created at my company, a new naming convention is used in Sonar. So some projects have their name as abbreviated, and some have their names as camel case, and some projects just have their names as words with spaces. If we could pass sonar-runner a project-name parameter, then that would let us have these values set by the integrations team (2-3 people), instead of the head of each project (10+ possible people). I feel like this may force us to create a Sonar rule for sonar

Sonar error Conditions should not unconditionally evaluate to “TRUE” or to “FALSE”

故事扮演 提交于 2019-12-07 07:10:24
问题 I am getting sonar violation: "Conditions should not unconditionally evaluate to "TRUE" or to "FALSE"" for the code below. List<MediaContent> savedList = source.getChildMediaContents(); List<MediaContent> supplierList = target.getChildMediaContents(); // if existing and incoming both empty if(savedList == null && supplierList == null){ return false; } // if one is null and other is not then update is required if(savedList == null && supplierList != null){ return true; } if(savedList != null &

New Msbuild Sonar runner is skipping analysis for .net projects

亡梦爱人 提交于 2019-12-06 14:41:17
I have setup new Msbuild sonar runner and kickoff analysis for a project type "class library". It went successful. To test it further, I have created one more project which has only one file with 5 Interface definitions. I made sure that names of interfaces NOT started with letter 'i'. I created a quality profile with one stylecop rule i.e. "Interface names must begin with i". I started cmd prompt (VS command prompt) and change it's path to the directory which has .csproj file. Clearly I am NOT at .sln file level. precisely one more level down where we can see .csproj file. Fired Begin -

Sonarqube C# scanner exception: “java.lang.IllegalArgumentException: is not a valid line offset for pointer”

断了今生、忘了曾经 提交于 2019-12-06 14:03:59
Does anyone know what's going on here? Using Sonarqube v5.6 on a windows server, c# scanner v5.5.0.479 Seems to pick this up in multiple files, and not always the same files, which is the most concerning. Anyone have any ideas? 16:46:03 INFO: Importing analysis results from E:\Jenkins\workspace\Job Build-UnitTest (PullRequests)\.sonar\output-cs 16:46:05 INFO: ------------------------------------------------------------------------ 16:46:05 INFO: EXECUTION FAILURE 16:46:05 INFO: ------------------------------------------------------------------------ 16:46:05 INFO: Total time: 3:36.304s 16:46

Calling Sonar from my java program

天大地大妈咪最大 提交于 2019-12-06 08:22:04
问题 I have installed sonar server on my localhost. And I am able to run and analyse the java project. Even i have installed sonar plugin on eclipse. But I want to run sonar from my java project(like simple java class) and should retrieve the sonar results and able to save it in database. I searched for the tutorial but unable to find the answer for this. Please anyone can give sample code or resource where I can gain knowledge to overcome this task. import javax.annotation.Resource; import org

MSBuild SonarQube runner skipping auto-generated files?

两盒软妹~` 提交于 2019-12-06 04:33:52
I have set up a local SonarQube 5.1.1 server. I have also installed the C# plugin (version 4.1), as well as the MSBuild runner (version 1.0). I then performed two separate runs on the .NET codebase for the project I am currently working on: Using sonar-runner and the C# plugin Using the MSBuild runner Both runs were made through the CLI. However, the runs yielded very different results. Here is an example: In the first run SonarQube calculated the number of code lines to be roughly 956 000, while in the second run it was calculated to be "only" about 434 000. I then did some digging, and it