Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

Doc changes to avoid user confusion of seperating tags with , in expr… #911

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/docs/cucumber/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,8 @@ A tag expression is an *infix boolean expression*. Below are some examples:
| `@smoke and @fast` | Scenarios tagged with both `@smoke` and `@fast` |
| `@gui or @database` | Scenarios tagged with either `@gui` or `@database` |

Note: Using a `,` to separate tags in expressions such as `@tag1,@tag2` will cause the entire expression to be parsed as a single tag, potentially leading to unintended outcomes. It's required to separate the tags with space or operators like `and` `or` and `not`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is legacy and we shouldn't be documenting this. Please use the documentation above.

Copy link
Contributor

@mpkorstanje mpkorstanje Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luke-hill I think the purpose was to explain people that there was a different syntax for tag expressions in the past and that they should upgrade theirs.

@shivam-sehgal this change is missing quite some context to help understand the reader what is going on. Consider a section along the line of "Upgrading from legacy tag expressions" that explains what old tag expressions may have looked like and how they should be rewritten.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In previous areas we've actively removed legacy information, so if we're going down that route (removing legacy info), I'd rather keep consistent than not.

But yes notwithstanding that, if something indicated that this isn't advised then yes I figure that could be ok


For even more advanced tag expressions you can use parenthesis for clarity, or
to change operator precedence:

Expand Down