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

gurkencheck A linter for Gherkin feature files.

no-empty-background

Removes a Background with no steps in it.

What it does#

An empty Background does nothing. It is usually left behind after a tidy-up.

Turning it on#

Add this to your .gurkencheckrc:

{
  "no-empty-background": "on"
}

Settings#

This rule has no settings. Switch it on with "no-empty-background": "on".

Examples#

Passes
Feature: Logging in

  Background:
    Given I am a known user

  Scenario: Logging in works
    When I log in

  Scenario: Logging out works
    When I log out
Fails
Feature: Logging in

  Background:

  Scenario: Logging in works
    When I log in

  Scenario: Logging out works
    When I log out

gurkencheck reports: Empty backgrounds are not allowed.