Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.
Richard Fennell edited this page Nov 27, 2017 · 5 revisions

StyleCopCmdLine

StyleCopCmdLine is wrapper project to make it possible to easily call StyleCop from a command prompt or a PowerShell script. It has been built against a variety of versions of StyleCop including StyleCop 4.7. The last release is against StyleCop 5.0

The initial design plan had been to do all the work in PowerShell but it was far easier to do the async event handling in C# and just provide a wrapper class to allow consumption from anything that can use a .NET library.

The core C# code is taken from the ALM Rangers TFS custom build activities project, with the Windows Workflow logic removed. See https://github.com/tfsbuildextensions/CustomActivities for the original project.

Usage

Solution Structure

The solution is made of the following projects

  • StyleCopWrapper - The main code, based on the TFS build activity
  • StyleCopWrapper.Tests - Unit tests
  • StyleCopCmdLine - The entry point EXE project, this is a separate project to the main code to allow the DLL to be loadable from a PowerShell script
  • MyCustomRules - A sample StyleCop custom rule DLL used in unit testing
  • PowerShellWrapper - A sample PowerShell script
Clone this wiki locally