# StyleCop

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/StyleCop
> Markdown URL: https://mediated.wiki/source/StyleCop.md
> Source: https://en.wikipedia.org/wiki/StyleCop
> Source revision: 1329534667
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Static program analysis software

StyleCop Original author Microsoft Developers Jason Allor, Andy Reeves, Chris Dahlberg Stable release 5.0.6329.1 / April 30, 2017; 9 years ago (2017-04-30) Written in C# Operating system Microsoft Windows Platform .NET Framework Type Static code analysis tool License Microsoft Public Licence Website github.com/StyleCop Repository github.com/StyleCop/StyleCop

**StyleCop** is an [open-source](/source/Open-source_software) [static code analysis](/source/Static_code_analysis) tool from [Microsoft](/source/Microsoft)[1] that checks [C#](/source/C_Sharp_(programming_language)) code for conformance to StyleCop's recommended coding styles and a subset of Microsoft's .NET Framework Design Guidelines. StyleCop analyses the [source code](/source/Source_code), allowing it to enforce a different set of rules from [FxCop](/source/FxCop) (which, instead of source code, checks [.NET](/source/.NET_Framework) [managed code](/source/Managed_code) [assemblies](/source/Assembly_(CLI))).[2][3] The rules are classified into the following categories:

- Documentation

- Layout

- Maintainability

- Naming

- Ordering

- Readability

- Spacing

StyleCop includes both [GUI](/source/GUI) and command-line versions of the tool. It is possible to add new rules to be applied.

StyleCop was originally developed by Jason Allor as a Microsoft internal tool, and was released externally as an open-source project in April 2010 on [CodePlex](/source/CodePlex).

StyleCop 4.7.55 (November 10, 2016) is compatible with Visual Studio 2008, 2010, 2012, 2013, and 2015.[4] (Microsoft Visual Studio Extension)

StyleCop began a move to [GitHub](/source/GitHub) in December 2014,[5] and the last change applied to the CodePlex edition was November 11, 2016.[6]

StyleCop 5.0.6329.1 (April 30, 2017) works with Visual Studio 2012, 2013, 2015, and 2017.[7] (Windows Installer)

Development is stopping. A named successor is StyleCopAnalyzers, for Visual Studio 2015 and later.[8]

## See also

- [Free and open-source software portal](https://en.wikipedia.org/wiki/Portal:Free_and_open-source_software)

- [FxCop](/source/FxCop)

- [List of tools for static code analysis](/source/List_of_tools_for_static_code_analysis)

## References

1. **[^](#cite_ref-1)** ["A Brief History Of C# Style"](https://blogs.msdn.microsoft.com/sourceanalysis/2008/05/25/a-brief-history-of-c-style/). 25 May 2008. Retrieved 2016-07-19.

1. **[^](#cite_ref-2)** Patton, Tony (June 24, 2011). ["Maintain code consistency with Microsoft StyleCop"](https://www.techrepublic.com/blog/programming-and-development/maintain-code-consistency-with-microsoft-stylecop/4328). *Blogs / Software Engineer*. TechRepublic. Retrieved December 10, 2011.

1. **[^](#cite_ref-3)** Chinery, Clive (July 30, 2009). ["8 More Useful Tools for ASP.NET"](http://www.serversidemagazine.com/asp-net/8-more-useful-tools-for-asp-net/). *ASP .Net*. Server-Side Magazine. Retrieved December 10, 2011.

1. **[^](#cite_ref-4)** [https://stylecop.codeplex.com/](https://stylecop.codeplex.com/) StyleCop (old CodePlex site)

1. **[^](#cite_ref-5)** [https://api.github.com/repos/StyleCop/StyleCop](https://api.github.com/repos/StyleCop/StyleCop) GitHub API response for StyleCop repository

1. **[^](#cite_ref-6)** [https://web.archive.org/web/20171226050423/http://stylecop.codeplex.com/SourceControl/list/changesets](https://web.archive.org/web/20171226050423/http://stylecop.codeplex.com/SourceControl/list/changesets) archive.org retrieval of StyleCop on CodePlex source history

1. **[^](#cite_ref-7)** [https://marketplace.visualstudio.com/items?itemName=ChrisDahlberg.StyleCop](https://marketplace.visualstudio.com/items?itemName=ChrisDahlberg.StyleCop) StyleCop - Visual Studio Marketplace

1. **[^](#cite_ref-8)** [https://github.com/StyleCop/StyleCop#considerations](https://github.com/StyleCop/StyleCop#considerations) StyleCop repository on GitHub

## External links

- [Official website](https://github.com/StyleCop)

- [Legacy Microsoft-hosted StyleCop blog (2010)](http://blogs.msdn.com/sourceanalysis)

v t e Microsoft free and open-source software (FOSS) Overview Microsoft and open source Shared Source Initiative Software Applications 3D Movie Maker Atom Conference XP Family.Show File Manager Open Live Writer Microsoft Edit Microsoft PowerToys Terminal Windows Calculator Windows Console Windows Package Manager WorldWide Telescope XML Notepad Video games Allegiance Zork Programming languages Bosque C# Dafny F# F* GW-BASIC IronPython IronRuby Lean P Power Fx PowerShell Project Verona Q# Small Basic Online TypeScript Visual Basic Frameworks, development tools .NET .NET Framework .NET Gadgeteer .NET MAUI .NET Micro Framework AirSim ASP.NET ASP.NET AJAX ASP.NET Core ASP.NET MVC ASP.NET Razor ASP.NET Web Forms Avalonia Babylon.js BitFunnel Blazor C++/WinRT CCF ChakraCore CLR Profiler Dapr DeepSpeed DiskSpd Dryad Dynamic Language Runtime eBPF on Windows Electron Entity Framework Fluent Design System Fluid Framework Infer.NET LightGBM Managed Extensibility Framework Microsoft Automatic Graph Layout Microsoft C++ Standard Library Microsoft Cognitive Toolkit Microsoft Design Language Microsoft Detours Microsoft Enterprise Library Microsoft SEAL mimalloc Mixed Reality Toolkit ML.NET mod_mono Mono MonoDevelop MSBuild MsQuic Neural Network Intelligence npm NuGet OneFuzz Open Management Infrastructure Open Neural Network Exchange Open Service Mesh Open XML SDK Orleans Playwright ProcDump ProcMon Python Tools for Visual Studio R Tools for Visual Studio RecursiveExtractor Roslyn Sandcastle SignalR StyleCop SVNBridge T2 Temporal Prover Text Template Transformation Toolkit TLA+ Toolbox U-Prove vcpkg Virtual File System for Git Voldemort VoTT Vowpal Wabbit Windows App SDK Windows Communication Foundation Windows Driver Frameworks KMDF UMDF Windows Forms Windows Presentation Foundation Windows Template Library Windows UI Library WinJS WinObjC WiX XDP for Windows XSP xUnit.net Z3 Theorem Prover Operating systems MS-DOS (v1.25, v2.0 & v4.0) Barrelfish SONiC Azure Linux Other ChronoZoom Extensible Storage Engine FlexWiki FourQ Gollum Project Mu ReactiveX SILK TLAPS TPM 2.0 Reference Implementation Windows Subsystem for Linux Licenses Microsoft Public License Microsoft Reciprocal License Forges CodePlex GitHub Related .NET Foundation F# Software Foundation Microsoft Open Specification Promise Open Letter to Hobbyists Open Source Security Foundation Outercurve Foundation Category

---
Adapted from the Wikipedia article [StyleCop](https://en.wikipedia.org/wiki/StyleCop) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/StyleCop?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
