Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up Data Validator help output to match dotnet-style #684

Merged
merged 1 commit into from Aug 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 11 additions & 4 deletions Source/Contrib/DataValidator/Program.cs
Expand Up @@ -21,6 +21,7 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using ORTS.Common;

namespace DataValidator
{
Expand All @@ -38,12 +39,18 @@ static void Main(string[] args)

static void ShowHelp()
{
Console.WriteLine("Open Rails Data Validator utility");
var version = FileVersionInfo.GetVersionInfo(typeof(Program).Assembly.Location);
Console.WriteLine("{0} {1}", version.FileDescription, VersionInfo.VersionOrBuild);
Console.WriteLine();
Console.WriteLine("{0} [/verbose] PATH [...]", Path.GetFileNameWithoutExtension(AppDomain.CurrentDomain.FriendlyName));
Console.WriteLine("Usage:");
Console.WriteLine(" {0} [options] <FILE> [...]", Path.GetFileNameWithoutExtension(version.FileName));
Console.WriteLine();
Console.WriteLine("Arguments:");
Console.WriteLine(" <FILE> Data files to validate; may contain wildcards");
Console.WriteLine();
Console.WriteLine("Options:");
Console.WriteLine(" /verbose Displays all expected/valid values in addition to any errors");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's missing a /help option.

Console.WriteLine();
// "1234567890123456789012345678901234567890123456789012345678901234567890123456789"
Console.WriteLine(" /verbose Displays all expected/valid values in addition to any errors.");
}

static void Validate(bool verbose, IEnumerable<string> files)
Expand Down