Uses Gherkin to parse feature files and runs linting against the
default rules, and the optional rules you specified in your .gplintrc
file.
Forked from gherkin-lint
Access to the documentation site to know how to use GPLint: https://gplint.github.io/
We encourage to check the site for complete documentation, but as quick start you can follow this:
Install as development dependency:
npm install --save-dev gplint
Set some basic rules to validate your gherkin files, to do that, create a file called .gplintrc
with the following
content:
{
"allow-all-caps": [
"error",
{
"Global": false,
"Description": false,
"ExampleHeader": true,
"ExampleBody": true
}
],
"allow-all-lowercase": [
"error",
{
"Global": false,
"Description": false,
"Step": true,
"ExampleHeader": true,
"ExampleBody": true
}
],
"file-name": [
"warn",
{
"style": "camelCase",
"allowAcronyms": true
}
],
"keywords-in-logical-order": [
"error",
{
"detectMissingKeywords": true
}
],
"no-superfluous-tags": "warn",
"no-unnamed-features": "error",
"no-unnamed-scenarios": "error",
"no-unused-variables": "warn"
}
Run it, checking the Gherkin files you have on test/features
folder.
gplint tests/features