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

Feature Request: Add in more options to no-multiple-empty-lines #285

Open
pieterocp opened this issue Feb 15, 2023 · 0 comments
Open

Feature Request: Add in more options to no-multiple-empty-lines #285

pieterocp opened this issue Feb 15, 2023 · 0 comments

Comments

@pieterocp
Copy link

Request

In addition to the on and off of no-multiple-empty-line it might be nice to allow it to be configured to a max property, defaulting to 1 as is the case currently but can be 2, 3 or 4 ...

It's often nice to have a couple of line breaks between sets of scenarios without having 3+ line breaks randomly in places. Making this configurable would allow this rule to be a bit more lax.

E.g. Adding the setting

{
  "no-multiple-empty-lines": ["on", {"max": 2}]
}

makes this feature file (from test-data-wip/MultipleEmptyLines.feature) valid:

Feature: Test for the no-multiple-empty-lines rule


Scenario: This is a Scenario for no-multiple-empty-lines
  Given I have a feature file with multiple empty lines
  Then I should see a no-multiple-empty-lines error

An additional stretch might be to extend this similar to the indentation rule where the max empty lines in the middle of a scenario/feature/background could be specified but it might get messy and overly complex to configure.

Implementation Concerns

Might be a backwards incompatible change if the configuration needs changing, unless it just handles the non-arrayed version defaulting to a max of 1.

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

1 participant