enkessler / cuke_linter

A linting tool for Cucumber
MIT License
32 stars 8 forks source link

New linter suggestions #25

Open PKuravskyi opened 1 year ago

PKuravskyi commented 1 year ago

Hey, no idea if you still working on adding new stuff for cuke linter but i have one additional linter suggestion.

It would be grate to check if 'Scenario Outline' keyword is used if there are Examples. And vice versa, check if Examples are present in feature when 'Scenario Outline' keyword is used

For example: we have Examples in our feature but we wrote Scenario word instead of Scenario Outline, so this way our check is triggered which would tell us something like - 'please use Scenario Outline keyword when using Examples'. And for the second part it would be something like - 'please specify Examples if you are using Scenario Outline'

enkessler commented 1 year ago

My activity has diminished in recent times, but I do still intend to participate in the wonderful world of open source development. This project, more than any of my others, likely has the most room for growth and work to be done, and so I'm always happy to assist in any progress.

It sounds like you want an OutlineWithoutExamplesLinter, which I'm kind of surprised doesn't already exist and should be easy enough to pattern off of any of the existing "X without Y" linters, and a RestrictedKeywordLinter, which could be a more generalized and configurable case than just indicating a preference for Scenario Outline over one of its synonyms.