-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Gherkin: Comments after tags not present in GherkinDocument.getCommentsList() #43
Comments
Normally Gherkin allows you to make full line comments only. Maybe @mpkorstanje can add something to this. |
I agree these comments don't adhere to the grammar. Unfortunately, I have limited influence how the files are written. As a workaround, we could have a flag that disables the hack that allows such comments. |
As this is deep in the grammar level, the usual cucumber settings cannot be applied there... so it is not easy to make a setting for that (the grammar/parser can be also used even without cucumber) |
As trade-offs go I think we currently have the right one. The user experience should weight much higher then being able to build a a feature file from the AST. Though I do see some room in the current AST to allow the comments on tag lines to be presented included. The
|
@mpkorstanje I think the AST would be able to handle the comments (BTW the normal comments do not necessarily start at column 0 or 1, but the column value indicates the position of the |
Summary
Comments on the same line as a tag cannot be retrieved from the list of comments.
Applies to tags on both Features and Scenarios.
Example:
Expected Behavior
All comments, including the ones following a tag on the same line, should be present in GherkinDocument.getCommentsList().
Current Behavior
Comments after a tag on the same line are inaccessible via the parser.
Context & Motivation
I want to import the complete file contents.
We often use comments after tags to simulate "tags with spaces", so these comments contain valuable information.
Your Environment
The text was updated successfully, but these errors were encountered: