unknown-directive
A comment that looks like a directive is one.
What it does#
A misspelt directive, such as gurkencheck-disable-nextline, is ignored so that it cannot switch off something it was not meant to - but the finding it was meant to hide stays. This check says so, and names the directive it most likely meant. It warns unless the configuration names it: "off" quiets it, "on" makes it fail the run.
Turning it on#
Add this to your .gurkencheckrc:
{
"unknown-directive": "on"
}
Settings#
This rule has no settings. Switch it on with "unknown-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-nextline name-length
Feature: A name that is long for a good reason
Scenario: Logging in
Given I am a known user
gurkencheck reports: "gurkencheck-disable-nextline" is not a directive, so it switches nothing off. Did you mean "gurkencheck-disable-next-line"?