Domanda

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?

È stato utile?

Soluzione

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

Altri suggerimenti

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...

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top