no-multiple-empty-lines
Limits how many blank lines may sit next to each other.
What it does#
One blank line separates things. Several in a row just add scrolling. If your team likes a wider gap between scenarios, raise the limit rather than switching the rule off. Blank lines inside a doc string are left alone, because they are part of the text being quoted.
Turning it on#
Add this to your .gurkencheckrc:
{
"no-multiple-empty-lines": ["on", {"max": 2}]
}
Settings#
| Setting | Value | If you leave it out | What it does |
|---|---|---|---|
max |
number of lines | 1 |
How many blank lines may sit next to each other. Each blank line past this is reported. |
Examples#
Passes
# With "max" left at 1:
Feature: Logging in
Scenario: A known user logs in
Given I am a known user
Fails
# With "max" left at 1:
Feature: Logging in
Scenario: A known user logs in
Given I am a known user
gurkencheck reports: Multiple empty lines are not allowed