Skip to content
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

Missing colons are not reported as invalid syntax #18

Open
thigg opened this issue Feb 8, 2021 · 4 comments
Open

Missing colons are not reported as invalid syntax #18

thigg opened this issue Feb 8, 2021 · 4 comments

Comments

@thigg
Copy link

thigg commented Feb 8, 2021

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:

  1. Create the following feature:
Feature: I am buggy

  Scenario: I put the colon in the end:
    Then I run the test
  1. 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

@mpkorstanje
Copy link
Contributor

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

@mpkorstanje mpkorstanje transferred this issue from cucumber/cucumber-jvm Feb 8, 2021
@aslakhellesoy
Copy link
Contributor

This will take a lot of effort to fix, and I don’t think it’s worth the effort. Thoughts?

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Feb 8, 2021

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.

@thigg
Copy link
Author

thigg commented Feb 8, 2021

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...

@mpkorstanje mpkorstanje transferred this issue from cucumber/common Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants