0

I have installed the Jenkins Violations plugin v0.7.11 and I am having an issue getting it to display FXCop and StyleCop violations.

In the settings I have entered the recommended XML filename pattern as:

**/*/FxCopViolations.xml 
**/*/StyleCopViolations.xml 

The report displays:

fxcop <span style='color:red'>No reports</span>  stylecop <span style='color:red'>No reports</span>

But when building locally in Visual Studio I can see that there are violations which should be appearing.

The XML files exist in the bin folders.

What am I missing here?

magritte
  • 7,396
  • 10
  • 59
  • 79

3 Answers3

0

Here are the settings I am using for my project: Execute Windows batch command build step with the following:

fxcopcmd /file:"<files>" /out:"%WORKSPACE%\fxcop-report.xml" /rs:="C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Static Analysis Tools\Rule Sets\MinimumRecommendedRules.ruleset" /s /searchgac

I then have the XML filename pattern as

fxcop-report.xml

Hope this is of some use to you

Alex
  • 16
  • Had the same problem. The problem came from the XML filename pattern. Absolute paths do not work : "c:\jenkins\jobs\myjob\workspace\etc\report.xml". Relative paths starting with ".\etc\report.xml" do not work. Only relative path without prefix work: "etc\report.xml" – FKDev Jul 08 '14 at 15:04
  • Once the xml filename pattern was fixed, either using the command line step or the predefined "fxcop exec" step work. – FKDev Jul 08 '14 at 15:11
0

In the command line argument:

FxCopCmd /project:"C:\Test_FxCop\Test_Assemblies.FxCop" /directory:"<trunkpath>\trunk" /out:"%WORKSPACE%\output.xml" /console /s

It will generate output XML file "output.xml"

Go to "Post build Action" and select "Report Violation" Plug-in

in the column "XML filename pattern" put the name as "output.xml"

Save the job and run again.. you would surely have the violation results...

Jaap
  • 81,064
  • 34
  • 182
  • 193
0

I had same problem with phpci, phpcpd, phpmd. Solved with: relative file path instead of absolute. enter image description here

user1435184
  • 185
  • 2
  • 5