Skip to content

Commit e6e5cde

Browse files
authored
✨Split the command handler and theirs data (#172)
fixes #121 (MINOR)
1 parent 252e827 commit e6e5cde

File tree

244 files changed

+8277
-10004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

244 files changed

+8277
-10004
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,19 @@ updates:
2727
dotnet:
2828
patterns:
2929
- "*"
30+
exclude-patterns:
31+
- "Microsoft.Extensions.*"
32+
33+
- package-ecosystem: "dotnet-sdk" # See documentation for possible values
34+
directory: "/" # Location of SDK manifests
35+
schedule:
36+
interval: "weekly"
37+
assignees:
38+
- "mgrosperrin"
39+
commit-message:
40+
prefix: "[.NET SDK update] "
41+
include: "scope"
42+
groups:
43+
dotnet:
44+
patterns:
45+
- "*"

.github/workflows/buildAndPublish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: windows-latest
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v5
2525
with:
2626
fetch-depth: 0
2727

@@ -42,10 +42,10 @@ jobs:
4242
run: dotnet build -c Release -p:Version=${{ steps.version.outputs.version}}
4343

4444
- name: Run tests
45-
run: dotnet test -c Release --no-build
45+
run: dotnet test -c Release --no-build -l trx --results-directory TestResults
4646

4747
- name: Upload dotnet test results
48-
uses: dorny/test-reporter@v1.8.0
48+
uses: dorny/test-reporter@v2.1.1
4949
if: ${{ !cancelled() }}
5050
with:
5151
name: .NET Tests

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
env:
16-
DOTNET_VERSION: '8.0.x'
16+
DOTNET_VERSION: '9.0.x'
1717

1818
permissions:
1919
checks: write

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- cron: '38 16 * * 5'
1010

1111
env:
12-
DOTNET_VERSION: '8.0.x'
12+
DOTNET_VERSION: '9.0.x'
1313

1414
jobs:
1515
analyze:
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: Checkout repository
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v5
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL

.github/workflows/generateDocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v4
11+
uses: actions/checkout@v5
1212
- name: Build documenation site
13-
uses: nunit/docfx-action@v3.1.0
13+
uses: nunit/docfx-action@v4.1.0
1414
with:
1515
args: docs/docfx.json
1616
- name: Upload documentation archive

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
env:
13-
DOTNET_VERSION: "8.0.x"
13+
DOTNET_VERSION: "9.0.x"
1414

1515
permissions:
1616
checks: write

Directory.Build.props

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
<Project>
2-
<PropertyGroup>
3-
<Product>MGR.CommandLineParser</Product>
4-
<TargetFramework>netstandard2.0</TargetFramework>
5-
<DocumentationFile>bin\$(Configuration)\netstandard2.0\$(MSBuildProjectName).xml</DocumentationFile>
6-
<LangVersion>latest</LangVersion>
7-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
8-
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
9-
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
10-
<WarningsAsErrors />
11-
<DebugType>portable</DebugType>
12-
<IsPackable>true</IsPackable>
13-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2+
<PropertyGroup>
3+
<Product>MGR.CommandLineParser</Product>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<DocumentationFile>bin\$(Configuration)\netstandard2.0\$(MSBuildProjectName).xml</DocumentationFile>
6+
<LangVersion>latest</LangVersion>
7+
<Nullable>enable</Nullable>
8+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
9+
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
10+
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
11+
<WarningsAsErrors />
12+
<DebugType>portable</DebugType>
13+
<IsPackable>true</IsPackable>
14+
<ImplicitUsings>enable</ImplicitUsings>
15+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1416

15-
<Authors>Matthias GROSPERRIN</Authors>
16-
<Company></Company>
17-
<PackageProjectUrl>https://github.com/mgrosperrin/commandlineparser</PackageProjectUrl>
18-
<RepositoryUrl>https://github.com/mgrosperrin/commandlineparser</RepositoryUrl>
19-
<Description>MGR.CommandLineParser is a multi-command line parser. It uses System.ComponentModel.DataAnnotations to declare the commands.</Description>
20-
<RepositoryType>git</RepositoryType>
21-
<Copyright>Copyright © Matthias GROSPERRIN</Copyright>
22-
<NeutralLanguage>en-US</NeutralLanguage>
23-
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
24-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
25-
<VSTestLogger>trx%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
26-
<VSTestResultsDirectory>$(MSBuildThisFileDirectory)/TestResults/$(TargetFramework)</VSTestResultsDirectory>
27-
</PropertyGroup>
17+
<Authors>Matthias GROSPERRIN</Authors>
18+
<Company></Company>
19+
<PackageProjectUrl>https://github.com/mgrosperrin/commandlineparser</PackageProjectUrl>
20+
<RepositoryUrl>https://github.com/mgrosperrin/commandlineparser</RepositoryUrl>
21+
<Description>MGR.CommandLineParser is a multi-command line parser. It uses System.ComponentModel.DataAnnotations to declare the commands.</Description>
22+
<RepositoryType>git</RepositoryType>
23+
<Copyright>Copyright © Matthias GROSPERRIN</Copyright>
24+
<NeutralLanguage>en-US</NeutralLanguage>
25+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
26+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
27+
<VSTestLogger>trx%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
28+
<VSTestResultsDirectory>$(MSBuildThisFileDirectory)/TestResults/$(TargetFramework)</VSTestResultsDirectory>
29+
</PropertyGroup>
2830

29-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
30-
<Optimize>true</Optimize>
31-
</PropertyGroup>
31+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
32+
<Optimize>true</Optimize>
33+
</PropertyGroup>
3234

3335
</Project>

Directory.Packages.props

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,24 @@
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
5-
<DotNetMainVersion>8.0.0</DotNetMainVersion>
6-
<DotNetLastVersion>8.0.0</DotNetLastVersion>
75
</PropertyGroup>
86

97
<ItemGroup>
10-
<PackageVersion Include="coverlet.collector" Version="6.0.2">
8+
<PackageVersion Include="coverlet.collector" Version="6.0.4">
119
<PrivateAssets>all</PrivateAssets>
1210
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1311
</PackageVersion>
1412
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
1513
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
1614
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="8.0.0" />
17-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
15+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
1816
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
1917
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
20-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
21-
<PackageVersion Include="Moq" Version="4.20.70" />
22-
<PackageVersion Include="Seq.Extensions.Logging" Version="8.0.0" />
18+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
19+
<PackageVersion Include="NSubstitute" Version="5.3.0" />
2320
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
24-
<PackageVersion Include="xunit" Version="2.7.0" />
25-
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7">
21+
<PackageVersion Include="xunit.v3" Version="3.0.0" />
22+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.3">
2623
<PrivateAssets>all</PrivateAssets>
2724
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
2825
</PackageVersion>

MGR.CommandLineParser.sln

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MGR.CommandLineParser", "src\MGR.CommandLineParser\MGR.CommandLineParser.csproj", "{EF6019C2-2C4D-4874-BBBF-D76CA30F7E8D}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{569ED12A-DA23-4457-B304-6B00C0CB335E}"
9+
ProjectSection(SolutionItems) = preProject
10+
tests\Directory.Build.props = tests\Directory.Build.props
11+
EndProjectSection
912
EndProject
1013
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MGR.CommandLineParser.UnitTests", "tests\MGR.CommandLineParser.UnitTests\MGR.CommandLineParser.UnitTests.csproj", "{22F60D05-F6DB-4410-80AD-E558EF1BDF6F}"
1114
EndProject
@@ -41,6 +44,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MGR.CommandLineParser.Hosti
4144
EndProject
4245
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "docs", "docs\docs.csproj", "{405858FA-1E78-48C7-9915-B558D0F15CAE}"
4346
EndProject
47+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{AF37E9B0-D41E-4CC2-8641-61FA6B28362B}"
48+
ProjectSection(SolutionItems) = preProject
49+
.github\dependabot.yml = .github\dependabot.yml
50+
EndProjectSection
51+
EndProject
52+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{BCD738AE-36C9-4CD9-B0F5-EAB942B193DC}"
53+
ProjectSection(SolutionItems) = preProject
54+
.github\workflows\buildAndPublish.yml = .github\workflows\buildAndPublish.yml
55+
.github\workflows\ci.yml = .github\workflows\ci.yml
56+
.github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml
57+
.github\workflows\generateDocs.yml = .github\workflows\generateDocs.yml
58+
.github\workflows\release.yml = .github\workflows\release.yml
59+
EndProjectSection
60+
EndProject
4461
Global
4562
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4663
Debug|Any CPU = Debug|Any CPU
@@ -92,6 +109,8 @@ Global
92109
{9F5A0142-E0A1-45A2-961E-55611B4440AD} = {FB795A12-C939-492F-9377-4C468D01EF3C}
93110
{40EAA8E2-7AFE-4ED1-A961-35BD7E424985} = {FB795A12-C939-492F-9377-4C468D01EF3C}
94111
{405858FA-1E78-48C7-9915-B558D0F15CAE} = {172E24C2-BF99-4DA9-A7DF-8C0BB44C138D}
112+
{AF37E9B0-D41E-4CC2-8641-61FA6B28362B} = {EF849FD3-293F-4CC8-B227-9680CF929A66}
113+
{BCD738AE-36C9-4CD9-B0F5-EAB942B193DC} = {AF37E9B0-D41E-4CC2-8641-61FA6B28362B}
95114
EndGlobalSection
96115
GlobalSection(ExtensibilityGlobals) = postSolution
97116
SolutionGuid = {827031C5-AE76-4B4C-9503-E13F15B497E9}

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ MGR.Commandlineparser
33

44
_**Build status**_
55

6-
| dev | [![Build status][build-status_dev_img]][build-status_dev_url] |
7-
|------------|---------------------------------------------------------|
8-
| **master** | [![Build status][build-status_master_img]][build-status_master_url] |
6+
[![CI][build-ci-status_img]][build-ci-status_url]
7+
[![CodeQL][build-codeql-status_img]][build-codeql-status_url]
98

109

1110
***MyGet*** *(preview bits)*:
@@ -133,10 +132,10 @@ Depending on the value of `args`, the result will be (when not providing the typ
133132
|`HelloWorld --name Matthias` or `HelloWorld -n Matthias`|return code is `CommandResultCode.Ok` (0) and `Hello world Matthias !` is printed to the console|
134133

135134

136-
[build-status_dev_img]: https://dev.azure.com/mgrosperrin/github/_apis/build/status/MGR.CommandLineParser?branchName=dev
137-
[build-status_dev_url]: https://dev.azure.com/mgrosperrin/github/_build?definitionId=14&_a=summary&repositoryFilter=4&branchFilter=22
138-
[build-status_master_img]: https://dev.azure.com/mgrosperrin/github/_apis/build/status/MGR.CommandLineParser?branchName=master
139-
[build-status_master_url]: https://dev.azure.com/mgrosperrin/github/_build?definitionId=14&_a=summary&repositoryFilter=4&branchFilter=39
135+
[build-ci-status_img]: https://github.com/mgrosperrin/commandlineparser/actions/workflows/ci.yml/badge.svg?branch=main
136+
[build-ci-status_url]: https://github.com/mgrosperrin/commandlineparser/actions/workflows/ci.yml
137+
[build-codeql-status_img]: https://github.com/mgrosperrin/commandlineparser/actions/workflows/codeql-analysis.yml/badge.svg?branch=main
138+
[build-codeql-status_url]: https://github.com/mgrosperrin/commandlineparser/actions/workflows/codeql-analysis.yml
140139
[myget_commandlineparser_img]: https://img.shields.io/myget/mgrosperrin/vpre/MGR.CommandLineParser.svg
141140
[myget_commandlineparser_url]: https://www.myget.org/feed/mgrosperrin/package/nuget/MGR.CommandLineParser/
142141
[myget-download_commandlineparser_img]: https://img.shields.io/myget/mgrosperrin/dt/MGR.CommandLineParser.svg

0 commit comments

Comments
 (0)