one everything is fine per project is enough
This commit is contained in:
@@ -27,7 +27,8 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
[Desc("DIRECTORY", "Check the *.cs source code files in a directory for code style violations.")]
|
[Desc("DIRECTORY", "Check the *.cs source code files in a directory for code style violations.")]
|
||||||
public void Run(ModData modData, string[] args)
|
public void Run(ModData modData, string[] args)
|
||||||
{
|
{
|
||||||
var projectPath = Path.GetFullPath(args[1]);
|
var relativePath = args[1];
|
||||||
|
var projectPath = Path.GetFullPath(relativePath);
|
||||||
|
|
||||||
var console = new StyleCopConsole(null, false, null, null, true);
|
var console = new StyleCopConsole(null, false, null, null, true);
|
||||||
var project = new CodeProject(0, projectPath, new Configuration(null));
|
var project = new CodeProject(0, projectPath, new Configuration(null));
|
||||||
@@ -39,6 +40,8 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
|
|
||||||
if (violationCount > 0)
|
if (violationCount > 0)
|
||||||
Environment.Exit(1);
|
Environment.Exit(1);
|
||||||
|
else
|
||||||
|
Console.WriteLine("No violations encountered in {0}.".F(relativePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnViolationEncountered(object sender, ViolationEventArgs e)
|
void OnViolationEncountered(object sender, ViolationEventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user