Integrate StyleCop into NAnt buildscript

Is there a way to integrate StyleCop into an NAnt script so that the build fails if there are too many style violations?

There seems to be no NAnt task for StyleCop, but we found StyleCopCmd . However, it only seems to generate an XML file as a result that we need to parse. Is there an easier solution?

+3
source share
3 answers

Yes - I set StyleCop to work only last week! (I have not used anything but StyleCop ...)

, , , , StyleCop Visual Studio 2008, , , .csproj, , .

, NAnt script, .

, , , VS2008, script. StyleCop .

, !

+2

NAnt.

:

  • .csproj.
  • StyleCop

: http://blogs.msdn.com/b/sourceanalysis/archive/2008/05/24/source-analysis-msbuild-integration.aspx

StyleCop , , ( ), , ( Visual Studio, MSBuild...).

, , NAnt MSBuild , StyleCop .

0

If you do not want to do this through MSBuild, you can do this using StyleCopCLI http://stylecopcli.sourceforge.net/

0
source

Source: https://habr.com/ru/post/1738012/


All Articles