one-feature-per-file Always on
One Feature per file.
What it does
Gherkin allows a single Feature in a file. A second one cannot be read, so the whole file fails to parse.
Turning it on
Add this to your .gurkencheckrc:
// Always on. Listing it is accepted and does nothing;
// asking for it to be off is an error.
{
"one-feature-per-file": "on"
}
Settings
This rule has no settings. Switch it on with "one-feature-per-file": "on".
Examples
Passes
Feature: Logging in
Scenario: A known user logs in
Given I am a known user
Fails
Feature: Logging in
Scenario: A known user logs in
Given I am a known user
Feature: Logging out
Scenario: A known user logs out
Given I am logged in
gurkencheck reports: Multiple "Feature" definitions in the same file are disallowed