When subclassing `Command<TSettings>` which has the [NotNull] attributes, Rider/ReSharper gives this warning:
> Nullability of type of parameter 'context' in method does not match overridden member `int Spectre.Console.Cli.Command<TSettings>.Execute(CommandContext, TSettings)` (possibly because of nullability attributes)
When subclassing `Command<TSettings>` which does not have the [NotNull] attributes, Rider/ReSharper gives this warning:
> The nullability attribute has no effect and can be safely removed
The solution is simply to remove the [NotNull] attributes.
Since `<Nullable>enable</Nullable>` is set in the project, they are actually not necessary. By the way, the non-generic `Command` class does not have the [NotNull] attributes.
This matches the actual content of the repository (except for a few files which have CRLF instead of LF)
The motivation behind this change is that Rider observes the .editorconfig rules and changes the line ending to CRLF on save. When submitting pull requests the diff is full of changes because all the end of lines were changed from LF to CRLF. By setting `end_of_line` to `LF` the end of lines are not changed on save and the diffs are clean when submitting pull requests.
This was initially introduced in 3c5b98123b4c9cd50a37da25ca9a3fd34ac7f479 by Daniel Cazzulino, then reverted in 82de4a55c48e269225ff2b137850a303b3776879 by Patrick Svensson because of a bug in the .NET 6.0.401 SDK.
Add support for converting command parameters that doesn't have a built-in TypeConverter but has a constructor that takes a string. For CLI apps, FileInfo and DirectoryInfo will likely be the most useful ones, but there may be others.
When a conversion to an enum fails, list all the valid enum values in the error message.
Message before this commit:
> Error: heimday is not a valid value for DayOfWeek.
Message after this commit:
> Error: Failed to convert 'heimday' to DayOfWeek. Valid values are 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'