You are reading the documentation for gurkencheck 0.0.4. Go to the latest version.

gurkencheck A linter for Gherkin feature files.

no-restricted-patterns

Bans wording you do not want in your feature files.

What it does

Some words creep into feature files and make them worse: leftover debugging steps, or vague verbs like "verify" that hide what is really being checked. List them here and they will be caught. Matching ignores upper and lower case.

Turning it on

Add this to your .gurkencheckrc:

{
  "no-restricted-patterns": ["on", {
    "Global": ["^prints the last response"],
    "Feature": ["verify", "validate"]
  }]
}

Settings

SettingValueIf you leave it outWhat it does
Global list of regular expressions empty list Applied everywhere, on top of the lists below.
Feature list of regular expressions empty list Applied to the Feature name and description.
Rule list of regular expressions empty list Applied to a Rule name and description.
Background list of regular expressions empty list Applied to a Background description and its steps.
Scenario list of regular expressions empty list Applied to a Scenario name, description and steps.
ScenarioOutline list of regular expressions empty list Applied to a Scenario Outline name, description and steps.

Examples

Passes
Feature: Logging in

  Scenario: A known user logs in
    Given I am a known user
    When I log in
    Then I see my dashboard
Fails
Feature: Verify logging in

  Scenario: A known user logs in
    Given I am a known user
    When I log in
    Then prints the last response

gurkencheck reports: Feature name: "Verify logging in" matches restricted pattern "/verify/i"