gplint
v2.2.0
Published
A Gherkin linter/validator written in Javascript.
Downloads
2,776
Maintainers
Readme
GPLint (Gherkin/Pickle Linter)
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
Documentation
Access to the documentation site to know how to use GPLint: https://gplint.github.io/
Quickstart
We encourage to check the site for complete documentation, but as quick start you can follow this:
Installation
Install as development dependency:
npm install --save-dev gplint
Create basic configuration
Set some basic rules to validate your gherkin files, to do that, create a file called .gplintrc
with the following
content:
.gplintrc
{
"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!
Run it, checking the Gherkin files you have on test/features
folder.
gplint tests/features