forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable C# 8.0 nullability for the CLI, Android and iOS projects, impr…
…ove help command behaviour (dotnet#145) This enables the nullability and resolves all warnings connected to that in the projects. There were a couple of changes I had to do (arguments re-work) in order to achieve this and some I did to improve working with the code: - Moved option definition to Argument classes. This makes the code easier to work with because the option definitions are together with the properties that they fill and their validation. - Improved the help command so that you can run `help [command] [subcommand]` which was not possible before. Now it's easier to explore the tool using calling `help xy`. It now also works properly even when you mess up the subcommand name. - Moved the Darwin class to the iOS project and kept the CLI project strictly CLI. - Dedicate the `ios test t=` argument to the `targets` option. It was originally assigned to `timeout` but `timeout` is optional and `targets` not. This change allows to call `ios test` with all required args using shortcuts (`-o -a -t`) Fixes: #16
- Loading branch information
Showing
28 changed files
with
694 additions
and
648 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...Microsoft.DotNet.XHarness.CLI/CommandArguments/Android/AndroidGetStateCommandArguments.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using Mono.Options; | ||
|
||
namespace Microsoft.DotNet.XHarness.CLI.CommandArguments.Android | ||
{ | ||
internal class AndroidGetStateCommandArguments : GetStateCommandArguments | ||
{ | ||
protected override OptionSet GetCommandOptions() => new OptionSet(); | ||
|
||
public override void Validate() | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/Microsoft.DotNet.XHarness.CLI/CommandArguments/GetStateCommandArguments.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
namespace Microsoft.DotNet.XHarness.CLI.CommandArguments | ||
{ | ||
internal abstract class GetStateCommandArguments : XHarnessCommandArguments | ||
{ | ||
} | ||
} |
19 changes: 0 additions & 19 deletions
19
src/Microsoft.DotNet.XHarness.CLI/CommandArguments/ICommandArguments.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.