From 7dcd523bfe790e35481dd1ede20b2060143d5f69 Mon Sep 17 00:00:00 2001
From: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com>
Date: Fri, 31 May 2024 03:32:15 +0300
Subject: [PATCH 1/3] Create dependabot.yml
---
.github/dependabot.yml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 .github/dependabot.yml
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..e85b23b
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,22 @@
+version: 2
+updates:
+ - package-ecosystem: github-actions
+ directory: "/"
+ schedule:
+ interval: monthly
+ labels:
+ - enhancement
+ groups:
+ actions:
+ patterns:
+ - "*"
+ - package-ecosystem: nuget
+ directory: "/"
+ schedule:
+ interval: monthly
+ labels:
+ - enhancement
+ groups:
+ nuget:
+ patterns:
+ - "*"
From fe935b57754c587b45b0d3085c79bf3953921c60 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 31 May 2024 18:48:56 +0300
Subject: [PATCH 2/3] Bump the nuget group across 1 directory with 6 updates
(#144)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
CliFx.Analyzers.Tests/CliFx.Analyzers.Tests.csproj | 8 ++++----
CliFx.Analyzers/CliFx.Analyzers.csproj | 2 +-
CliFx.Benchmarks/CliFx.Benchmarks.csproj | 2 +-
CliFx.Tests/CliFx.Tests.csproj | 10 +++++-----
CliFx/CliFx.csproj | 2 +-
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/CliFx.Analyzers.Tests/CliFx.Analyzers.Tests.csproj b/CliFx.Analyzers.Tests/CliFx.Analyzers.Tests.csproj
index bbb4ed3..019c240 100644
--- a/CliFx.Analyzers.Tests/CliFx.Analyzers.Tests.csproj
+++ b/CliFx.Analyzers.Tests/CliFx.Analyzers.Tests.csproj
@@ -12,12 +12,12 @@
-
+
-
+
-
-
+
+
diff --git a/CliFx.Analyzers/CliFx.Analyzers.csproj b/CliFx.Analyzers/CliFx.Analyzers.csproj
index 72d720a..10b7043 100644
--- a/CliFx.Analyzers/CliFx.Analyzers.csproj
+++ b/CliFx.Analyzers/CliFx.Analyzers.csproj
@@ -21,7 +21,7 @@
-
+
\ No newline at end of file
diff --git a/CliFx.Benchmarks/CliFx.Benchmarks.csproj b/CliFx.Benchmarks/CliFx.Benchmarks.csproj
index 53158c2..40b5172 100644
--- a/CliFx.Benchmarks/CliFx.Benchmarks.csproj
+++ b/CliFx.Benchmarks/CliFx.Benchmarks.csproj
@@ -13,7 +13,7 @@
-
+
diff --git a/CliFx.Tests/CliFx.Tests.csproj b/CliFx.Tests/CliFx.Tests.csproj
index 53d6aa5..c52c68e 100644
--- a/CliFx.Tests/CliFx.Tests.csproj
+++ b/CliFx.Tests/CliFx.Tests.csproj
@@ -14,13 +14,13 @@
-
+
-
-
-
-
+
+
+
+
diff --git a/CliFx/CliFx.csproj b/CliFx/CliFx.csproj
index c1b7320..8fabcdb 100644
--- a/CliFx/CliFx.csproj
+++ b/CliFx/CliFx.csproj
@@ -23,7 +23,7 @@
-
+
From bcb34055acac0ff87acc478f9c8227027367f260 Mon Sep 17 00:00:00 2001
From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Date: Fri, 31 May 2024 18:56:49 +0300
Subject: [PATCH 3/3] Fix `System.Command.Line` usage
---
.../Benchmarks.SystemCommandLine.cs | 21 +++++++++----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/CliFx.Benchmarks/Benchmarks.SystemCommandLine.cs b/CliFx.Benchmarks/Benchmarks.SystemCommandLine.cs
index 5a5d433..a83fbd1 100644
--- a/CliFx.Benchmarks/Benchmarks.SystemCommandLine.cs
+++ b/CliFx.Benchmarks/Benchmarks.SystemCommandLine.cs
@@ -1,5 +1,4 @@
using System.CommandLine;
-using System.CommandLine.Invocation;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
@@ -9,20 +8,20 @@ public partial class Benchmarks
{
public class SystemCommandLineCommand
{
- public static int ExecuteHandler(string s, int i, bool b) => 0;
+ public static void ExecuteHandler(string s, int i, bool b) { }
public Task ExecuteAsync(string[] args)
{
- var command = new RootCommand
- {
- new Option(["--str", "-s"]) { Argument = new Argument() },
- new Option(["--int", "-i"]) { Argument = new Argument() },
- new Option(["--bool", "-b"]) { Argument = new Argument() }
- };
+ var stringOption = new Option(["--str", "-s"]);
+ var intOption = new Option(["--int", "-i"]);
+ var boolOption = new Option(["--bool", "-b"]);
- command.Handler = CommandHandler.Create(
- typeof(SystemCommandLineCommand).GetMethod(nameof(ExecuteHandler))!
- );
+ var command = new RootCommand();
+ command.AddOption(stringOption);
+ command.AddOption(intOption);
+ command.AddOption(boolOption);
+
+ command.SetHandler(ExecuteHandler, stringOption, intOption, boolOption);
return command.InvokeAsync(args);
}