Skip to content

Commit 7eb06fe

Browse files
committed
renamed to HelpCalled and made it have no effect on the HasErrors property
1 parent 10348eb commit 7eb06fe

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

FluentCommandLineParser.Tests/FluentCommandLineParserTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,8 @@ public void Setup_Help_And_Ensure_It_Is_Called_With_Custom_Formatter()
597597
var result = parser.Parse(args);
598598

599599
Assert.AreSame(expectedCallbackResult, callbackResult);
600-
Assert.IsTrue(result.HasErrors);
601-
Assert.IsTrue(result.HelpShown);
600+
Assert.IsFalse(result.HasErrors);
601+
Assert.IsTrue(result.HelpCalled);
602602
}
603603

604604
#endregion

FluentCommandLineParser/FluentCommandLineParser.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public ICommandLineParserResult Parse(string[] args)
177177

178178
if (this.HelpOption.ShouldShowHelp(args))
179179
{
180-
result.HelpShown = true;
180+
result.HelpCalled = true;
181181
this.HelpOption.ShowHelp(this.Options);
182182
return result;
183183
}

FluentCommandLineParser/ICommandLineParserResult.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ public interface ICommandLineParserResult
3838
bool HasErrors { get; }
3939

4040
/// <summary>
41-
/// Gets whether the help text was shown to the user.
41+
/// Gets whether the help text was called.
4242
/// </summary>
43-
bool HelpShown { get; }
43+
bool HelpCalled { get; }
4444

4545
/// <summary>
4646
/// Gets the errors which occurred during the parse operation.

FluentCommandLineParser/Internals/CommandLineParserResult.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public CommandLineParserResult()
4747
/// </summary>
4848
public bool HasErrors
4949
{
50-
get { return this.Errors.Any() || HelpShown; }
50+
get { return this.Errors.Any(); }
5151
}
5252

5353
/// <summary>
@@ -90,8 +90,8 @@ IEnumerable<ICommandLineOption> ICommandLineParserResult.UnMatchedOptions
9090
public IList<ICommandLineOption> UnMatchedOptions { get; set; }
9191

9292
/// <summary>
93-
/// Gets whether the help text was shown to the user.
93+
/// Gets whether the help text was called.
9494
/// </summary>
95-
public bool HelpShown { get; set; }
95+
public bool HelpCalled { get; set; }
9696
}
9797
}

0 commit comments

Comments
 (0)