StyleCop Community Rules contain additional rules for Microsoft StyleCop.
The following rules are available:
- LinesMustNotEndWithWhitespace (CO1000): Checks for trailing whitespace
- LinesMustNotBeLongerThanNumCharacters (CO1001): Checks that line length does not exceed a configured number of characters
- FilesMustNotEndWithMultipleEmptyLines (CO1002): Checks for multiple empty lines at the end of file
- FilesMustEndWithNewline (CO1003): Checks that a file ends with a newline
- FilesMustNotStartWithWhitespace (CO1004): Checks that file does not start with whitespace
StyleCop Community Rules are developed with Microsoft Visual Studio 2008. Building the project with the Express Edition should also work.
Copy Microsoft.StyleCop.dll and Microsoft.StyleCop.CSharp.dll from the StyleCop installation directory into this project's Libraries directory. Then open the solution Community.StyleCop.Rules.sln in Visual Studio and build it. The resulting assembly is called Community.StyleCop.CSharp.Rules.dll.
If you do not want to build the assembly yourself, you can grab it from the download page.
StyleCop Community Rules require at least Microsoft .NET Framework 3.5.
Copy Community.StyleCop.CSharp.Rules.dll into the StyleCop installation directory. StyleCop will pick up the new rules automatically and use them on its next run.
You can configure the rules through StyleCop Settings in Microsoft Visual Studio. Some settings are exposed directly in the Rules tab of StyleCop Settings, others are in the Community Settings tab.
If you find bugs in this software, please create an issue or contact me directly. Of course, patches and forks are also welcome!
StyleCop Community Rules is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
StyleCop Community Rules is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with StyleCop Community Rules. If not, see http://www.gnu.org/licenses/.