Property 'sonar.cs.opencover.reportsPaths' is not declared as multi-values/property set but was read using 'getStringArray' method

377 views
Skip to first unread message

chuc...@gmail.com

unread,
Jan 25, 2018, 1:39:20 AM1/25/18
to SonarQube
I am doing the code coverage in Jenkins by sonarqube plugin.

https://docs.sonarqube.org/pages/viewpage.action?pageId=6389770
MSBuild.SonarQube.Runner.exe begin /k:"sonarqube_project_key" /n:"sonarqube_project_name" /v:"sonarqube_project_version" /d:sonar.cs.vscoveragexml.reportsPaths="%CD%\VisualStudio.coveragexml"

I got the following warning:
WARNING: WARN: Property 'sonar.cs.opencover.reportsPaths' is not declared as multi-values/property set but was read using 'getStringArray' method. The SonarQube plugin declaring this property should be updated.

What I supposed to do? Where can I update the property in Jenkins?

chuc...@gmail.com

unread,
Jan 25, 2018, 2:16:10 AM1/25/18
to SonarQube
I have paste the wrong command, The correct command should be:
MSBuild.SonarQube.Runner.exe begin /k:"sonarqube_project_key" /n:"sonarqube_project_name" /v:"sonarqube_project_version" /d:sonar.cs.opencover.reportsPaths="%CD%\opencover.xml"

I have checked the opencover.xml. It seems the coverage is calculated correctly.
But the sonarqube did not get the information.
<Class>
          <Summary numSequencePoints="3" visitedSequencePoints="2" numBranchPoints="3" visitedBranchPoints="2" sequenceCoverage="66.67" branchCoverage="66.67" maxCyclomaticComplexity="2" minCyclomaticComplexity="1" visitedClasses="1" numClasses="1" visitedMethods="1" numMethods="1" />
          <FullName>CodeCoverage.Math</FullName>
          <Methods>
            <Method visited="true" cyclomaticComplexity="2" nPathComplexity="2" sequenceCoverage="66.67" branchCoverage="66.67" isConstructor="false" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="3" visitedSequencePoints="2" numBranchPoints="3" visitedBranchPoints="2" sequenceCoverage="66.67" branchCoverage="66.67" maxCyclomaticComplexity="2" minCyclomaticComplexity="2" visitedClasses="0" numClasses="0" visitedMethods="1" numMethods="1" />
              <MetadataToken>100663297</MetadataToken>
              <Name>System.Int32 CodeCoverage.Math::CodeCoverage.IMath.Divide(System.Int32,System.Int32)</Name>
              <FileRef uid="3" />
              <SequencePoints>
                <SequencePoint vc="1" uspid="5" ordinal="0" offset="0" sl="7" sc="13" el="7" ec="24" bec="2" bev="1" fileid="3" />
                <SequencePoint vc="1" uspid="6" ordinal="1" offset="3" sl="8" sc="17" el="8" ec="30" bec="0" bev="0" fileid="3" />
                <SequencePoint vc="0" uspid="7" ordinal="2" offset="7" sl="10" sc="13" el="10" ec="22" bec="0" bev="0" fileid="3" />
              </SequencePoints>
              <BranchPoints>
                <BranchPoint vc="1" uspid="8" ordinal="0" offset="1" sl="7" path="0" offsetend="3" fileid="3" />
                <BranchPoint vc="0" uspid="9" ordinal="1" offset="1" sl="7" path="1" offsetend="7" fileid="3" />
              </BranchPoints>
              <MethodPoint xsi:type="SequencePoint" vc="1" uspid="5" ordinal="0" offset="0" sl="7" sc="13" el="7" ec="24" bec="2" bev="1" fileid="3" />
            </Method>
            <Method visited="true" cyclomaticComplexity="1" nPathComplexity="0" sequenceCoverage="0" branchCoverage="0" isConstructor="true" isStatic="false" isGetter="false" isSetter="false">
              <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="1" minCyclomaticComplexity="1" visitedClasses="0" numClasses="0" visitedMethods="0" numMethods="0" />
              <MetadataToken>100663298</MetadataToken>
              <Name>System.Void CodeCoverage.Math::.ctor()</Name>
              <SequencePoints />
              <BranchPoints />
              <MethodPoint vc="1" uspid="10" ordinal="0" offset="0" />
            </Method>
          </Methods>
        </Class>

Amaury Leve

unread,
Jan 25, 2018, 8:03:10 AM1/25/18
to chuc...@gmail.com, SonarQube
Hi,

You can safely ignore this warning. This is something that needs to be fixed on SonarC# (linked to the new SonarQube API).

I have created a ticket on our side to fix this warning ASAP: https://github.com/SonarSource/sonar-csharp/issues/1106

Cheers,
Amaury

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/4e268c93-c53d-4c55-b9b5-a76bd5b5cddb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Amaury Levé | SonarSource

Software Developer - .Net Team

http://sonarsource.com


Are you using SonarLint in your IDE? 
Reply all
Reply to author
Forward
0 new messages