Missing colons are not reported as invalid syntax
Describe the bug If the colon after a scenario is missing, the scenario is simply not run, instead of being reported as invalid To Reproduce Steps to reproduce the behavior:
- Create the following feature:
Feature: I am buggy
Scenario: I put the colon in the end:
Then I run the test
- Run the feature
Expected behavior The scenario is reported as invalid Context & Motivation
It costs a lot of time if this happens, because the misplaced colon is not obvious
Screenshots
Your Environment Cucumber 6.8.1
Fair enough.
For now I would recommend using an IDE with syntax highlighting. It should make it more apparent what the problem is:
Feature: I am buggy
This a general description of the feature to explain what it does and put the scenarios in to context.
It can be multiple lines long.
Scenario: I put the colon in the end:
Then I run the test
This will take a lot of effort to fix, and I don’t think it’s worth the effort. Thoughts?
I'm not sure. With the way the grammar is defined the Scenario keyword line terminates the description. The Step keyword line could be used in the same way and then used to detect this problem.
Fair enough.
For now I would recommend using an IDE with syntax highlighting. It should make it more apparent what the problem is:
Thats why I opened a second issue at intellij ;)
Intellij was perfectly fine with the colon free version...