no-tags-on-backgrounds Always on
A Background cannot have tags.
What it does
A Background runs before every scenario in its Feature, so a tag on it would have no meaning. Gherkin does not allow it, and a file with one cannot be read at all.
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.
{
"no-tags-on-backgrounds": "on"
}
Settings
This rule has no settings. Switch it on with "no-tags-on-backgrounds": "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
@setup
Background:
Given I am a known user
Scenario: Logging in works
When I log in
gurkencheck reports: Tags on Backgrounds are disallowed