Use "uri" instead of "path" to reference feature files. #1179
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.
Summary
Use "uri" instead of "path" to reference feature files, especially in public methods of classes in the api packages.
Details
"uri" is used in the Gherkin library to refer to feature files, and has also the advantage of that uri:s use the same separator, "/", on all platforms, whereas path:s use different separators, "/" on Unix/Linux and MacOS, but "" in Windows.
Technically we are abusing the uri concept by also using "uri"s defined relative the "current directory", an correct uri always define the scheme (
file
,http(s)
etc), and are in case of the file scheme the absolute path on the host in question.Motivation and Context
Consistency with the Gherkin library, enabling using the same output regardless of the platform.
For several releases Cucumber-JVM has regardless of platform used "
/
" when referencing to feature files, but internally the method namegetPath()
has been used to access this reference (which is a contradiction on Windows).Types of changes
Checklist: