-
-
Notifications
You must be signed in to change notification settings - Fork 10
Add Dotnet Implementation #219
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
clrudolphi
wants to merge
14
commits into
main
Choose a base branch
from
dotnet
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
61ccca5
First commit
clrudolphi f32ad14
Add github workflows and nuget package creation.
clrudolphi 5191a32
Code refactoring, comments, and unit tests for the Lexer.
clrudolphi 6d5ffb0
Improve documentation, tests, and assembly signing
clrudolphi f6544ef
Update CHANGELOG.md
clrudolphi 1941994
Improve Lexer Handling of Null Input
clrudolphi 08614a9
Updates per review comments.
clrudolphi 0a67e22
complete the renaming process to Cucumber.TagExpressions
clrudolphi c8df619
Refactor from Github Copilot review.
clrudolphi 4a7282f
CodeMaid cleanups.
clrudolphi d00b994
Merge branch 'main' into dotnet
clrudolphi 4dbb567
Update .NET to match changes made in PRs #221 and #222 (empty/NULL t…
clrudolphi 9b974e9
Housekeeping: modify tests so that VS2022 Test Explorer shows meaning…
clrudolphi c43a411
Update CHANGELOG.md
clrudolphi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,22 @@ | ||
| name: Release NuGet | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ release/* ] | ||
|
|
||
| jobs: | ||
| publish-nuget: | ||
| name: Publish package to NuGet.org | ||
| # Failing on `ubuntu-24.04` (https://github.com/cucumber/gherkin/issues/349) | ||
| runs-on: ubuntu-22.04 | ||
| environment: Release | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: 9.0.x | ||
| - uses: cucumber/[email protected] | ||
| with: | ||
| nuget-api-key: ${{ secrets.NUGET_API_KEY }} | ||
| working-directory: "dotnet" |
This file contains hidden or 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,32 @@ | ||
| name: test-dotnet | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - renovate/** | ||
| paths: | ||
| - dotnet/** | ||
| - testdata/** | ||
| - .github/** | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - dotnet/** | ||
| - testdata/** | ||
| - .github/** | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
| test-dotnet: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: | | ||
| 8.0.x | ||
| 9.0.x | ||
| - run: dotnet test | ||
| working-directory: dotnet |
This file contains hidden or 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 hidden or 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,13 @@ | ||
| root=true | ||
|
|
||
| [*] | ||
| indent_style=space | ||
| end_of_line=crlf | ||
| charset=utf-8 | ||
|
|
||
| [*.{csproj,props}] | ||
| indent_size=2 | ||
|
|
||
| [*.cs] | ||
| indent_size=4 | ||
| insert_final_newline = true |
This file contains hidden or 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,178 @@ | ||
| ## Ignore Visual Studio temporary files, build results, and | ||
| ## files generated by popular Visual Studio add-ons. | ||
|
|
||
| # User-specific files | ||
| *.suo | ||
| *.user | ||
| *.sln.docstates | ||
| *.ide | ||
|
|
||
| # Build results | ||
|
|
||
| [Dd]ebug/ | ||
| [Rr]elease/ | ||
| x64/ | ||
| build/ | ||
| [Oo]bj/ | ||
| */**/bin | ||
|
|
||
| # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets | ||
| !packages/*/build/ | ||
|
|
||
| # MSTest test Results | ||
| [Tt]est[Rr]esult*/ | ||
| [Bb]uild[Ll]og.* | ||
|
|
||
| *_i.c | ||
| *_p.c | ||
| *.ilk | ||
| *.meta | ||
| *.obj | ||
| *.pch | ||
| *.pdb | ||
| *.pgc | ||
| *.pgd | ||
| *.rsp | ||
| *.sbr | ||
| *.tlb | ||
| *.tli | ||
| *.tlh | ||
| *.tmp | ||
| *.tmp_proj | ||
| *.log | ||
| *.vspscc | ||
| *.vssscc | ||
| .builds | ||
| *.pidb | ||
| *.log | ||
| *.scc | ||
|
|
||
| # Visual C++ cache files | ||
| ipch/ | ||
| *.aps | ||
| *.ncb | ||
| *.opensdf | ||
| *.sdf | ||
| *.cachefile | ||
|
|
||
| # Visual Studio profiler | ||
| *.psess | ||
| *.vsp | ||
| *.vspx | ||
|
|
||
| # Guidance Automation Toolkit | ||
| *.gpState | ||
|
|
||
| # ReSharper is a .NET coding add-in | ||
| _ReSharper*/ | ||
| *.[Rr]e[Ss]harper | ||
|
|
||
| # TeamCity is a build add-in | ||
| _TeamCity* | ||
|
|
||
| # DotCover is a Code Coverage Tool | ||
| *.dotCover | ||
|
|
||
| # NCrunch | ||
| *.ncrunch* | ||
| .*crunch*.local.xml | ||
|
|
||
| # Installshield output folder | ||
| [Ee]xpress/ | ||
|
|
||
| # DocProject is a documentation generator add-in | ||
| DocProject/buildhelp/ | ||
| DocProject/Help/*.HxT | ||
| DocProject/Help/*.HxC | ||
| DocProject/Help/*.hhc | ||
| DocProject/Help/*.hhk | ||
| DocProject/Help/*.hhp | ||
| DocProject/Help/Html2 | ||
| DocProject/Help/html | ||
|
|
||
| # Click-Once directory | ||
| publish/ | ||
|
|
||
| # Publish Web Output | ||
| *.Publish.xml | ||
|
|
||
| # NuGet Packages Directory | ||
| ## TODO: If you have NuGet Package Restore enabled, uncomment the next line | ||
| #packages/ | ||
|
|
||
| # Windows Azure Build Output | ||
| csx | ||
| *.build.csdef | ||
|
|
||
| # Windows Store app package directory | ||
| AppPackages/ | ||
|
|
||
| # Others | ||
| sql/ | ||
| *.Cache | ||
| ClientBin/ | ||
| [Ss]tyle[Cc]op.* | ||
| ~$* | ||
| *~ | ||
| *.dbmdl | ||
| *.[Pp]ublish.xml | ||
| *.pfx | ||
| *.publishsettings | ||
|
|
||
| # RIA/Silverlight projects | ||
| Generated_Code/ | ||
|
|
||
| # Backup & report files from converting an old project file to a newer | ||
| # Visual Studio version. Backup files are not needed, because we have git ;-) | ||
| _UpgradeReport_Files/ | ||
| Backup*/ | ||
| UpgradeLog*.XML | ||
| UpgradeLog*.htm | ||
|
|
||
| # SQL Server files | ||
| App_Data/*.mdf | ||
| App_Data/*.ldf | ||
|
|
||
|
|
||
| #LightSwitch generated files | ||
| GeneratedArtifacts/ | ||
| _Pvt_Extensions/ | ||
| ModelManifest.xml | ||
|
|
||
| # ========================= | ||
| # Windows detritus | ||
| # ========================= | ||
|
|
||
| # Windows image file caches | ||
| Thumbs.db | ||
| ehthumbs.db | ||
|
|
||
| # Folder config file | ||
| Desktop.ini | ||
|
|
||
| # Recycle Bin used on file shares | ||
| $RECYCLE.BIN/ | ||
|
|
||
| # Mac desktop service store files | ||
| .DS_Store | ||
|
|
||
| packages/ | ||
| acceptance/ | ||
| output/ | ||
| .built | ||
| .compared | ||
| .sln_built_debug | ||
| *.userprefs | ||
| *.nupkg | ||
| Gherkin.NuGetPackages/bin/ | ||
| .build* | ||
| .built* | ||
| .vscode | ||
| .run_tests | ||
| .generated | ||
| .packed | ||
| .tested | ||
| .fixprotoc | ||
| .vs/ | ||
|
|
||
| # ======================== |
This file contains hidden or 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,31 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio Version 17 | ||
| VisualStudioVersion = 17.14.36616.10 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cucumber.TagExpressions", "TagExpressions\Cucumber.TagExpressions.csproj", "{0BDD57B5-52F9-4866-8031-C84E41138453}" | ||
| EndProject | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cucumber.TagExpressionsTest", "TagExpressionsTest\Cucumber.TagExpressionsTest.csproj", "{EBEAC0FF-9EA0-4065-B39E-B9C4C29EE48A}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {0BDD57B5-52F9-4866-8031-C84E41138453}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {0BDD57B5-52F9-4866-8031-C84E41138453}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {0BDD57B5-52F9-4866-8031-C84E41138453}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {0BDD57B5-52F9-4866-8031-C84E41138453}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| {EBEAC0FF-9EA0-4065-B39E-B9C4C29EE48A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {EBEAC0FF-9EA0-4065-B39E-B9C4C29EE48A}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {EBEAC0FF-9EA0-4065-B39E-B9C4C29EE48A}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {EBEAC0FF-9EA0-4065-B39E-B9C4C29EE48A}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {0789D1F0-C759-4F1D-BED0-F55A1E05100B} | ||
| EndGlobalSection | ||
| EndGlobal |
Binary file not shown.
This file contains hidden or 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 @@ | ||
| <Project> | ||
|
|
||
| <PropertyGroup> | ||
| <LangVersion>13</LangVersion> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| <TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> | ||
This file contains hidden or 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,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) Cucumber Ltd | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
This file contains hidden or 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,5 @@ | ||
| [](https://www.nuget.org/packages/Cucumber.TagExpressions) | ||
|
|
||
| # Cucumber Tag Expressions for .NET | ||
|
|
||
| [The docs are here](https://cucumber.io/docs/cucumber/api/#tag-expressions). |
This file contains hidden or 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,41 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>netstandard2.0</TargetFramework> | ||
| <NoWarn>1591</NoWarn> | ||
| <SignAssembly>true</SignAssembly> | ||
| <AssemblyOriginatorKeyFile>..\Cucumber.TagExpressions.snk</AssemblyOriginatorKeyFile> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Label="Version"> | ||
| <VersionNumber>8.0.0</VersionNumber> | ||
| <Version Condition="'$(SnapshotSuffix)' != ''">$(VersionNumber)-$(SnapshotSuffix)</Version> | ||
| <Version Condition="'$(SnapshotSuffix)' == ''">$(VersionNumber)</Version> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <None Include="$(MSBuildThisFileDirectory)\Resources\cucumber-mark-green-128.png"> | ||
| <Pack>True</Pack> | ||
| <PackagePath>.</PackagePath> | ||
| <Visible>true</Visible> | ||
| </None> | ||
| </ItemGroup> | ||
|
|
||
| <PropertyGroup Label="Package Properties"> | ||
| <Product>Cucumber.TagExpressions</Product> | ||
| <PackageId>Cucumber.TagExpressions</PackageId> | ||
| <Authors>Cucumber Ltd, Chris Rudolphi</Authors> | ||
| <Copyright>Copyright © Cucumber Ltd, Chris Rudolphi</Copyright> | ||
| <Description>Tag Expressions is a simple query language for Cucumber tags.</Description> | ||
| <PackageTags>reqnroll gherkin cucumber</PackageTags> | ||
| <PackageProjectUrl>https://github.com/cucumber/tag-expressions</PackageProjectUrl> | ||
| <RepositoryUrl>https://github.com/cucumber/tag-expressions</RepositoryUrl> | ||
| <RepositoryType>git</RepositoryType> | ||
| <PackageIcon>cucumber-mark-green-128.png</PackageIcon> | ||
| <PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
|
|
||
| <GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
| <PackageOutputPath>bin/$(Configuration)/NuGet</PackageOutputPath> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> |
This file contains hidden or 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,20 @@ | ||
| namespace Cucumber.TagExpressions; | ||
|
|
||
| /// <summary> | ||
| /// Represents a tag expression that can be evaluated against a set of input tags. | ||
| /// </summary> | ||
| public interface ITagExpression | ||
| { | ||
| /// <summary> | ||
| /// Evaluates the tag expression against the provided input tags. | ||
| /// </summary> | ||
| /// <param name="inputs">A collection of input tags to evaluate against.</param> | ||
| /// <returns><c>true</c> if the expression matches the inputs; otherwise, <c>false</c>.</returns> | ||
| bool Evaluate(IEnumerable<string> inputs); | ||
|
|
||
| /// <summary> | ||
| /// Returns the string representation of the tag expression. | ||
| /// </summary> | ||
| /// <returns>A string that represents the tag expression.</returns> | ||
| string ToString(); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also add
<Nullable>enable</Nullable>here and handle nullable details.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done