unknown-rule-in-directive
A directive names only rules that exist and can be switched off.
What it does#
A directive naming a rule that does not exist - a typo - switches nothing off, and the finding it was meant to hide stays with no hint why. The same goes for a rule that cannot be switched off, such as an always-on one. This check warns unless the configuration names it: "off" quiets it, "on" makes it fail the run.
Turning it on#
Add this to your .gurkencheckrc:
{
"unknown-rule-in-directive": "on"
}
Settings#
This rule has no settings. Switch it on with "unknown-rule-in-directive": "on".
Examples#
Passes
# gurkencheck-disable-next-line name-length
Feature: A name that is long for a good reason
Scenario: Logging in
Given I am a known user
Fails
# gurkencheck-disable-next-line name-lenght
Feature: A name that is long for a good reason
Scenario: Logging in
Given I am a known user
gurkencheck reports: A directive names "name-lenght", which is not a rule, so it switches nothing off. Did you mean "name-length"?