Rules
List of rules. Some rules have icons next with the names, that icons have the following meaning:
| Icon | Description |
|---|---|
⚙️ | Rule have configuration properties. |
🪄 | Rule allows autofix with --fix cli parameter. |
allow-all-caps ⚙️
Allows the user to specify if some nodes allows texts completely in uppercase.
allow-all-lowercase ⚙️
Allows the user to specify if some nodes allows texts completely in lowercase.
allowed-tags ⚙️
Only the listed tags are allowed.
file-name ⚙️
Restrict feature file names to a common style.
indentation ⚙️ 🪄
Allows the user to specify indentation rules.
keywords-in-logical-order ⚙️
Allows the user to maintain the wording order by using the scenario keywords, following the Given, When, Then sequence.
max-keywords ⚙️
Allow to limit the amount of steps of the specified keywords. The keywords And, But, or * counts as the previous keyword.
max-scenarios-per-file ⚙️
Allows the user to specify the max number of scenarios per feature file.
max-tags-lines ⚙️
Allows the user to specify the max number of lines for tags in each level. Each level type can be configured separately.
name-length ⚙️
Allows restricting length of Feature/Scenario/Step names. The default is 70 characters for each of these
new-line-at-eof ⚙️ 🪄
Disallows/enforces new line at EOF.
no-background-only-scenario
Disallows background when there is just one scenario.
no-dupe-feature-names
Disallows duplicate Feature names.
no-dupe-scenario-names ⚙️
Disallows duplicate Scenario names. Can be configured to search for duplicates in each individual feature or amongst all feature files.
no-duplicate-tags
Disallows duplicate tags on the same Feature or Scenario.
no-empty-background
Disallows features with backgrounds without steps.
no-empty-file
Disallows empty feature files.
no-examples-in-scenarios
Disallow the use of "Examples" in Scenarios, only allowed in Scenario Outlines.
no-files-without-scenarios
Disallows files with no scenarios.
no-homogenous-tags
Disallows tags present on every Scenario/Rule in a Feature or Rule, rather than on the Feature/Rule itself. Skips if contains a single scenario.
no-multiple-empty-lines
Disallows multiple empty lines.
no-partially-commented-tag-lines ⚙️
Disallows partially commented tag lines. You can configure if a comment is allowed if is separated with a space or not allowed at all.
no-restricted-patterns ⚙️
A list of patterns to disallow globally, or specifically in features, rules, backgrounds, scenarios, or scenario outlines, Steps. All patterns are treated as case-insensitive
no-restricted-tags ⚙️
Disallow use of particular tags. It's possible to set exact text match or patterns using a regular expression. See the examples to know how it works.
no-scenario-outlines-without-examples
Disallows scenario outlines without examples.
no-superfluous-tags
Disallows tags present on a Node, its parents (E.g. Same tags in a Scenario and/or Example, and also on the Feature or Rule that contains it.
no-trailing-spaces 🪄
Disallows trailing spaces.
no-unnamed-features
Disallows empty Feature name.
no-unnamed-scenarios
Disallows empty Scenario name.
no-unused-variables
Disallows unused variables in scenario outlines.
one-space-between-tags
Tags on the same line must be separated by a single space.
related-tags ⚙️
Define a list of tags with a list of related tags that should be present too. The related tags can be a string or a regular expression (represented as a string between slashes /.
required-tags ⚙️
Require tags/patterns of tags. The properties for levels (global, feature, rule, scenario and example),
scenario-size ⚙️
Lets you specify a maximum step length for scenarios and backgrounds. The Scenario configuration applies to both scenarios and scenario outlines.
table-align ⚙️
Allows to force table alignment on steps and/or examples. Is possible to specify if you want to apply this rule for tables on steps and/or examples
use-and
Disallows repeated step names requiring use of And instead.