https://github.com/locktar/stylecop-check-in-policy
Visual Studio check-in policy for checking your code with StyleCop
https://github.com/locktar/stylecop-check-in-policy
Last synced: about 1 year ago
JSON representation
Visual Studio check-in policy for checking your code with StyleCop
- Host: GitHub
- URL: https://github.com/locktar/stylecop-check-in-policy
- Owner: LockTar
- Created: 2017-08-15T06:49:54.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-12T13:44:34.000Z (about 7 years ago)
- Last Synced: 2025-03-29T13:05:25.197Z (about 1 year ago)
- Language: C#
- Homepage:
- Size: 3.7 MB
- Stars: 0
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# StyleCop-Check-in-Policy
This GitHub site is the sourcecode for the Visual Studio check-in policy for checking your code with StyleCop. This check-in policy could be installed via the [Marketplace](https://marketplace.visualstudio.com).
Select the right version:
* [Visual Studio 2012](https://marketplace.visualstudio.com/items?itemName=RalphJansen.StyleCopCheck-inPolicy2012)
* [Visual Studio 2013](https://marketplace.visualstudio.com/items?itemName=RalphJansen.StyleCopCheck-inPolicy2013)
* [Visual Studio 2015](https://marketplace.visualstudio.com/items?itemName=RalphJansen.StyleCopCheck-inPolicy2015)
* [Visual Studio 2017](https://marketplace.visualstudio.com/items?itemName=RalphJansen.StyleCopCheck-inPolicy2017)
## Functions
* Global StyleCop settings for whole Team Project
* Import your current StyleCop settings (if you already use StyleCop) into the check-in policy
* Export the StyleCop settings of the check-in policy
* Override the settings for specific projects with the power of merged StyleCop settings files
* Thread the Check-in violations as errors, warnings or information messages in Visual Studio
* Exclude folders to be checked
## Requirements
* Visual Studio 2012
* Visual Studio 2013
* Visual Studio 2015
* Visual Studio 2017
*Optional note*:
Set the `/p:StyleCopTreatErrorsAsWarnings=false` parameter in your build definition to throw an error when there is a StyleCop warning. This works if you have the NuGet [StyleCop.MSBuild](https://www.nuget.org/packages/StyleCop.MSBuild/) package installed. This way your build will fail so no corrupt code is checked-in. This check-in policy prevents users from checking-in bad code but it is a check-in policy so it could be overridden. You can set this parameter in your build definition on the "Process" tab, under the "Advanced" category and then the "MSBuild Arguments" property.