FEAT: Global default lexer configuration#14
Merged
yanjustino merged 3 commits intomainfrom Jun 20, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a global default lexer setting to simplify test configuration, updates documentation to reflect the new feature, bumps the package version to 1.3.0, and includes funding metadata.
- Introduces
GherXunitConfig.DefaultLexerand updates handler methods to honor it. - Updates
README.mdwith new usage guidance and removes outdated custom-lexer section. - Bumps version to 1.3.0 and adds
.github/FUNDING.yml.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/GherXunit/GherXunit.csproj | Version bumped from 1.2.0 to 1.3.0 |
| src/lib/GherXunit/GherXunit.Content.StringHandler.cs | Adds GherXunitConfig for global default lexer |
| src/lib/GherXunit/GherXunit.Content.Methods.cs | Uses GherXunitConfig.DefaultLexer as fallback |
| src/base/GherXunit.Core/StringHandler.cs | Adds duplicate GherXunitConfig in core assembly |
| src/base/GherXunit.Core/Methods.cs | Updates core methods to use global default lexer |
| src/base/GherXunit.Core/Samples/LocalizationTest.cs | Sample now sets GherXunitConfig.DefaultLexer |
| README.md | Replaces custom-lexer docs with global-lexer guide |
| .github/FUNDING.yml | Adds project funding configuration |
Comments suppressed due to low confidence (1)
src/lib/GherXunit/GherXunit.Content.Methods.cs:77
- There should be a unit test verifying that
GherXunitConfig.DefaultLexeris applied whenlexeris null, ensuring the fallback logic is covered.
var stepString = new StringHandler(lexer ?? GherXunitConfig.DefaultLexer ?? Lexers.Default);
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces enhancements to the
GherXunitframework, focusing on improving usability through global configuration for lexers, updating documentation, and versioning. The most important changes include the addition of a global default lexer configuration, updates to the documentation inREADME.md, and the release of version 1.3.0.Framework Enhancements:
GherXunitConfig.DefaultLexerproperty to allow setting a global default lexer for all tests, simplifying configuration and reducing redundancy. (src/base/GherXunit.Core/StringHandler.cs,src/lib/GherXunit/GherXunit.Content.StringHandler.cs) [1] [2]GherXunitConfig.DefaultLexer) if specified, falling back to the default lexers otherwise. (src/base/GherXunit.Core/Methods.cs,src/lib/GherXunit/GherXunit.Content.Methods.cs) [1] [2]Documentation Updates:
README.mdto include new sections on the benefits ofGherXunit, usage examples, references, and instructions for defining the global lexer. Removed outdated content about custom lexers. [1] [2]Versioning:
GherXunitfrom 1.2.0 to 1.3.0 to reflect the new features and improvements. (src/lib/GherXunit/GherXunit.csproj)Funding Information:
FUNDING.ymlfile to specify supported funding platforms and sponsorship options for project contributors. (.github/FUNDING.yml)