Content updated: 4/23/2019.
Put two developers together and they’re bound to have a discussion about coding style. No two developers write code in the exact same way.
More often than not, one isn’t better than the other and it’s just a matter of taste. In a team or in a single project, it’s more important to be consistent than it is to choose the right style.
Agreeing on a style can be hard enough, but enforcing it shouldn’t be something you do manually. It will be tedious and error-prone.
StyleCop is a tool that can automate this. Let’s have a look at how to set it up and what it brings to the table. This post will walk you through the following:
- What Stylecop is.
- How to install and run it.
- Integration into your build.
- Defining rule excpetions
- Analyzing all projects
- Using the command line
So, read on if you want to learn everything there is to know about Stylecop.