This tool lints gherkin files.
run gherkin_lint
on a list of files
gherkin_lint FEATURE_FILES
With --disable CHECK
or --enable CHECK
it's possible to disable respectivly enable program wide checks.
Checks could be disabled using tags within Feature Files. To do so, add @disableCHECK. Detailed usage within the disable_tags feature.
Assuming there are feature files in the current directory. Then call.
docker run -ti -v $(pwd):/src -w /src gherkin/lint *.feature
This will mount the current directory within the Gherkin Lint Docker Container and then check all feature files.
- avoid outline for single example
- avoid period
- avoid scripting
- be declarative
- background does more than setup
- background requires scenario
- bad scenario name
- file name differs feature name
- invalid file name
- invalid step flow
- missing example name
- missing feature description
- missing feature name
- missing scenario name
- missing test action
- missing verification
- same tag for all scenarios
- tag used multiple times
- too clumsy
- too long step
- too many different tags
- too many steps
- too many tags
- unique scenario names
- unknown variable
- use background
- use outline
There are errors and warnings.
Warnings are for issues that do not influence the returncode. These issues are also for introducing new checks. These new checks will stay some releases as warning and will be later declared as error, to give users the possibility to adapt their codebase.
If there is at least one error, the returncode will be set to ERROR (!= 0).
Install it with:
sudo gem install gherkin_lint
After that gherkin_lint
executable is available.