Is there a way to use StyleCop 4.5 from the command line in a separate source file, for example stylecop HelloWorld.cs ?
stylecop HelloWorld.cs
You can not. This is not a feature of the style; it integrates only with VS2008 / 2010 and MsBuild.
There is this project in sourceforge that can do what you are looking for. DISCLAIMER: I have not tried.
Here's an article describing how to create a simple C # console application using StyleCop on the specified file.
Feel free to create your own runner who can handle the results in any way.
To revive the old stream ...
https://github.com/Nylle/StyleCop.Console seems to work well.
There is this project available on SourceForge.net which you can use from the command line.
There's also StyleCopCmd , a command line shell, and an NAnt task for StyleCop.
Source: https://habr.com/ru/post/894217/More articles:NHibernate QueryOver <> - Aggregate function over SubQuery - c #The optional type "System.Collections.IEnumerable" cannot be used with type arguments - genericsHow to add XML processing instructions during JAXB Marshal - javaHow to save filter values ββin WPF toolkit datagrid "filter extension"? - c #NSBundle mainBundle pathForResource (maybe not the same problem) - ioshow to find which process has a file descriptor from a file name - c ++Resume FTP upload after timeout - pythonCan I use a collection initializer for an attribute? - c #SharePoint namespace does not exist in Microsoft namespace - new-operatorSharepoint development with Visual Studio Express? - visual-studioAll Articles