Skip to content

Spell check #497

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/CommandLine/Error.cs
Original file line number Diff line number Diff line change
@@ -241,7 +241,7 @@ internal BadFormatTokenError(string token)
}

/// <summary>
/// Base type of all erros with name information.
/// Base type of all errors with name information.
/// </summary>
public abstract class NamedError : Error, IEquatable<NamedError>
{
@@ -498,7 +498,7 @@ internal SetValueExceptionError(NameInfo nameInfo, Exception exception, object v
}

/// <summary>
/// The expection thrown from Property.SetValue
/// The exception thrown from Property.SetValue
/// </summary>
public Exception Exception
{
4 changes: 2 additions & 2 deletions src/CommandLine/Infrastructure/Either.cs
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ enum EitherType
/// </summary>
Left,
/// <summary>
/// Sccessful computation case.
/// Successful computation case.
/// </summary>
Right
}
@@ -319,4 +319,4 @@ public static bool IsRight<TLeft, TRight>(this Either<TLeft, TRight> either)
return either.Tag == EitherType.Right;
}
}
}
}
12 changes: 6 additions & 6 deletions src/CommandLine/Infrastructure/ErrorHandling.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//Use project level define(s) when referencing with Paket.
//#define ERRH_INTERNAL // Uncomment this to set visibility to internal.
//#define ERRH_DISABLE_INLINE_METHODS // Uncomment this to enable method inlining when compiling for >= NET 4.5.
//#define ERRH_BUILTIN_TYPES // Uncomment this to use built-in Unit type, instead of extenral identical CSharpx.Unit.
//#define ERRH_BUILTIN_TYPES // Uncomment this to use built-in Unit type, instead of external identical CSharpx.Unit.

using System;
using System.Collections.Generic;
@@ -345,7 +345,7 @@ public static Result<TSuccess, TMessage> MergeMessages<TSuccess, TMessage>(

/// <summary>
/// If the result is a Success it executes the given function on the value.
/// Otherwise the exisiting failure is propagated.
/// Otherwise the existing failure is propagated.
/// </summary>
#if !ERRH_DISABLE_INLINE_METHODS
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -377,7 +377,7 @@ public static Result<TSuccess, TMessage> Flatten<TSuccess, TMessage>(

/// <summary>
/// If the wrapped function is a success and the given result is a success the function is applied on the value.
/// Otherwise the exisiting error messages are propagated.
/// Otherwise the existing error messages are propagated.
/// </summary>
#if !ERRH_DISABLE_INLINE_METHODS
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -579,7 +579,7 @@ public static Result<IEnumerable<TSuccess>, TMessage> Flatten<TSuccess, TMessage

/// <summary>
/// If the result is a Success it executes the given Func on the value.
/// Otherwise the exisiting failure is propagated.
/// Otherwise the existing failure is propagated.
/// </summary>
#if !ERRH_DISABLE_INLINE_METHODS
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -593,7 +593,7 @@ public static Result<TResult, TMessage> SelectMany<TSuccess, TMessage, TResult>(
/// <summary>
/// If the result is a Success it executes the given Func on the value.
/// If the result of the Func is a Success it maps it using the given Func.
/// Otherwise the exisiting failure is propagated.
/// Otherwise the existing failure is propagated.
/// </summary>
#if !ERRH_DISABLE_INLINE_METHODS
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -664,4 +664,4 @@ public static TSuccess SucceededWith<TSuccess, TMessage>(this Result<TSuccess, T
string.Join(Environment.NewLine, bad.Messages.Select(m => m.ToString()))));
}
}
}
}
6 changes: 3 additions & 3 deletions src/CommandLine/Infrastructure/Maybe.cs
Original file line number Diff line number Diff line change
@@ -296,7 +296,7 @@ public static Maybe<TResult> SelectMany<TSource, TValue, TResult>(

#region Do Semantic
/// <summary>
/// If contans a value executes an <see cref="System.Action{T}"/> delegate over it.
/// If contains a value executes an <see cref="System.Action{T}"/> delegate over it.
/// </summary>
public static void Do<T>(this Maybe<T> maybe, Action<T> action)
{
@@ -308,7 +308,7 @@ public static void Do<T>(this Maybe<T> maybe, Action<T> action)
}

/// <summary>
/// If contans a value executes an <see cref="System.Action{T1, T2}"/> delegate over it.
/// If contains a value executes an <see cref="System.Action{T1, T2}"/> delegate over it.
/// </summary>
public static void Do<T1, T2>(this Maybe<Tuple<T1, T2>> maybe, Action<T1, T2> action)
{
@@ -394,4 +394,4 @@ public static IEnumerable<T> ToEnumerable<T>(this Maybe<T> maybe)
return Enumerable.Empty<T>();
}
}
}
}
4 changes: 2 additions & 2 deletions src/CommandLine/NullInstance.cs
Original file line number Diff line number Diff line change
@@ -3,10 +3,10 @@
namespace CommandLine
{
/// <summary>
/// Models a null result when constructing a <see cref="ParserResult{T}"/> in a faling verbs scenario.
/// Models a null result when constructing a <see cref="ParserResult{T}"/> in a failing verbs scenario.
/// </summary>
public sealed class NullInstance
{
internal NullInstance() { }
}
}
}
2 changes: 1 addition & 1 deletion src/CommandLine/Text/HelpText.cs
Original file line number Diff line number Diff line change
@@ -305,7 +305,7 @@ public SentenceBuilder SentenceBuilder
/// <param name="verbsIndex">If true the output style is consistent with verb commands (no dashes), otherwise it outputs options.</param>
/// <param name="maxDisplayWidth">The maximum width of the display.</param>
/// <param name="comparison">a comparison lambda to order options in help text</param>
/// <remarks>The parameter <paramref name="verbsIndex"/> is not ontly a metter of formatting, it controls whether to handle verbs or options.</remarks>
/// <remarks>The parameter <paramref name="verbsIndex"/> is not only a matter of formatting, it controls whether to handle verbs or options.</remarks>
public static HelpText AutoBuild<T>(
ParserResult<T> parserResult,
Func<HelpText, HelpText> onError,
2 changes: 1 addition & 1 deletion src/CommandLine/Text/SentenceBuilder.cs
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ public static SentenceBuilder Create()
public abstract Func<bool, string> HelpCommandText { get; }

/// <summary>
/// Get a delegate that returns the help text of vesion command.
/// Get a delegate that returns the help text of version command.
/// The delegates must accept a boolean that is equal <value>true</value> for options; otherwise <value>false</value> for verbs.
/// </summary>
public abstract Func<bool, string> VersionCommandText { get; }
4 changes: 2 additions & 2 deletions src/CommandLine/UnParserExtensions.cs
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ public bool ShowHidden
/// <summary>
/// Factory method that creates an instance of <see cref="CommandLine.UnParserSettings"/> with GroupSwitches set to true.
/// </summary>
/// <returns>A properly initalized <see cref="CommandLine.UnParserSettings"/> instance.</returns>
/// <returns>A properly initialized <see cref="CommandLine.UnParserSettings"/> instance.</returns>
public static UnParserSettings WithGroupSwitchesOnly()
{
return new UnParserSettings { GroupSwitches = true };
@@ -67,7 +67,7 @@ public static UnParserSettings WithGroupSwitchesOnly()
/// <summary>
/// Factory method that creates an instance of <see cref="CommandLine.UnParserSettings"/> with UseEqualToken set to true.
/// </summary>
/// <returns>A properly initalized <see cref="CommandLine.UnParserSettings"/> instance.</returns>
/// <returns>A properly initialized <see cref="CommandLine.UnParserSettings"/> instance.</returns>
public static UnParserSettings WithUseEqualTokenOnly()
{
return new UnParserSettings { UseEqualToken = true };
18 changes: 9 additions & 9 deletions tests/CommandLine.Tests/Fakes/Help_Fakes.cs
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ class Simple_Options_Without_HelpText
[Option("input-file")]
public string FileName { get; set; }

[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visibile to the user via help text.")]
[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visible to the user via help text.")]
public string SecertOption { get; set; }
}

@@ -25,7 +25,7 @@ class Simple_Options_With_HelpText_Set
[Option('i', "input-file", Required = true, HelpText = "Specify input file to be processed.")]
public string FileName { get; set; }

[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visibile to the user via help text.")]
[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visible to the user via help text.")]
public string SecertOption { get; set; }
}

@@ -37,7 +37,7 @@ class Simple_Options_With_HelpText_Set_To_Long_Description
[Option("input-file", HelpText = "This is a very long description of the Input File argument that gets passed in. It should be passed in as a string.")]
public string FileName { get; set; }

[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visibile to the user via help text.")]
[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visible to the user via help text.")]
public string SecertOption { get; set; }
}

@@ -49,7 +49,7 @@ class Simple_Options_With_HelpText_Set_To_Long_Description_Without_Spaces
[Option("input-file", HelpText = "Before 012345678901234567890123456789 After")]
public string FileName { get; set; }

[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visibile to the user via help text.")]
[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visible to the user via help text.")]
public string SecertOption { get; set; }
}

@@ -76,7 +76,7 @@ class Options_With_Usage_Attribute
[Value(0, HelpText = "Value.")]
public string Value { get; set; }

[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visibile to the user via help text.")]
[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visible to the user via help text.")]
public string SecertOption { get; set; }

[Usage(ApplicationAlias = "mono testapp.exe")]
@@ -99,7 +99,7 @@ public class Secert_Verb
[Option('f', "force", SetName = "mode-f", HelpText = "Allow adding otherwise ignored files.")]
public bool Force { get; set; }

[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visibile to the user via help text.")]
[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visible to the user via help text.")]
public string SecertOption { get; set; }
}

@@ -117,7 +117,7 @@ public class Add_Verb_With_Usage_Attribute
[Value(0)]
public string FileName { get; set; }

[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visibile to the user via help text.")]
[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visible to the user via help text.")]
public string SecertOption { get; set; }

[Usage(ApplicationAlias = "git")]
@@ -140,7 +140,7 @@ public class Commit_Verb_With_Usage_Attribute
[Option("amend", HelpText = "Used to amend the tip of the current branch.")]
public bool Amend { get; set; }

[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visibile to the user via help text.")]
[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visible to the user via help text.")]
public string SecertOption { get; set; }

[Usage(ApplicationAlias = "git")]
@@ -164,7 +164,7 @@ public class Clone_Verb_With_Usage_Attribute
HelpText = "Suppress summary message.")]
public bool Quiet { get; set; }

[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visibile to the user via help text.")]
[Option("secert-option", Hidden = true, HelpText = "This is a description for a secert hidden option that should never be visible to the user via help text.")]
public string SecertOption { get; set; }

[Value(0, MetaName = "URLS",