You are reading the documentation for gurkencheck 0.0.9. Go to version 0.0.10.

gurkencheck A linter for Gherkin feature files.

name-length

Stops names and steps from growing too long.

What it does#

A very long name is usually a sign that too much is being described at once. You can set a separate limit for each kind of name, and set any of them to 0 to stop checking that kind. Steps are often the one people want to leave alone.

Turning it on#

Add this to your .gurkencheckrc:

{
  "name-length": ["on", {
    "Feature": 70,
    "Scenario": 70,
    "Step": 0
  }]
}

Settings#

SettingValueIf you leave it outWhat it does
Feature number of characters, or 0 for no limit 70 Longest allowed Feature name.
Rule number of characters, or 0 for no limit 70 Longest allowed Rule name.
Scenario number of characters, or 0 for no limit 70 Longest allowed Scenario name.
Step number of characters, or 0 for no limit 70 Longest allowed step text. Set to 0 to stop checking step length.

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 who has already confirmed their email address and accepted the terms logs in
    Given I am a known user

gurkencheck reports: Scenario name is too long. Length of 95 is longer than the maximum allowed: 70