Skip to content

Commit

Permalink
Change help to use hyphen switches and consistent casing
Browse files Browse the repository at this point in the history
  • Loading branch information
dasMulli committed Sep 24, 2018
1 parent 90506c8 commit 72d0f71
Show file tree
Hide file tree
Showing 16 changed files with 3,578 additions and 3,576 deletions.
12 changes: 7 additions & 5 deletions src/MSBuild.UnitTests/CommandLineSwitches_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ public void ProcessNodeReuseSwitchFalseLast()
#endif

/// <summary>
/// Regress DDB #143341:
/// Regress DDB #143341:
/// msbuild /clp:v=quiet /clp:v=diag /m:2
/// gave console logger in quiet verbosity; expected diagnostic
/// </summary>
Expand Down Expand Up @@ -1329,7 +1329,7 @@ public void ProcessWarnAsErrorSwitchEmpty()
CommandLineSwitches commandLineSwitches = new CommandLineSwitches();

MSBuildApp.GatherCommandLineSwitches(new ArrayList(new [] { "/warnaserror" }), commandLineSwitches);

ISet<string> actualWarningsAsErrors = MSBuildApp.ProcessWarnAsErrorSwitch(commandLineSwitches);

Assert.NotNull(actualWarningsAsErrors);
Expand Down Expand Up @@ -1447,9 +1447,11 @@ public void HelpMessagesAreValid()
// All lines should be 80 characters or less
Assert.True(helpMessageLines[i].Length <= 80, $"Line {i + 1} of '{item.Key}' should be no longer than 80 characters.");

string trimmedLine = helpMessageLines[i].Trim();

if (i == 0)
{
if (helpMessageLines[i].Trim().StartsWith("/") || helpMessageLines[i].Trim().StartsWith("@"))
if (trimmedLine.StartsWith("-") || trimmedLine.StartsWith("@"))
{
// If the first line in a switch it needs a certain amount of leading spaces
Assert.True(helpMessageLines[i].StartsWith(switchLeadingSpaces), $"Line {i + 1} of '{item.Key}' should start with '{switchLeadingSpaces}'.");
Expand All @@ -1465,13 +1467,13 @@ public void HelpMessagesAreValid()
// Ignore empty lines
if (!String.IsNullOrWhiteSpace(helpMessageLines[i]))
{

if (item.Key.Contains("Examples"))
{
// Examples require a certain number of leading spaces
Assert.True(helpMessageLines[i].StartsWith(examplesLeadingSpaces), $"Line {i + 1} of '{item.Key}' should start with '{examplesLeadingSpaces}'.");
}
else if (helpMessageLines[i].Trim().StartsWith("/") || helpMessageLines[i].Trim().StartsWith("@"))
else if (trimmedLine.StartsWith("-") || trimmedLine.StartsWith("@"))
{
// Switches require a certain number of leading spaces
Assert.True(helpMessageLines[i].StartsWith(switchLeadingSpaces), $"Line {i + 1} of '{item.Key}' should start with '{switchLeadingSpaces}'.");
Expand Down
348 changes: 174 additions & 174 deletions src/MSBuild/Resources/Strings.resx

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.cs.xlf

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.de.xlf

Large diffs are not rendered by default.

554 changes: 277 additions & 277 deletions src/MSBuild/Resources/xlf/Strings.en.xlf

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.es.xlf

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.fr.xlf

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.it.xlf

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.ja.xlf

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.ko.xlf

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.pl.xlf

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.pt-BR.xlf

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.ru.xlf

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.tr.xlf

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf

Large diffs are not rendered by default.

0 comments on commit 72d0f71

Please sign in to comment.