Skip to main content

About GPLint

GPLint is a tool for identifying and reporting on patterns found in Gherkin definition files, with the goal of making Gherkin definitions more consistent and avoiding bugs and mistakes.

Prerequisites​

Quick start​

Install GPLint as a development dependency with this shell command:

npm install --save-dev gplint

Configuration​

The default name for the configuration file is .gplintrc and it's expected to be in your working directory.

The file contents must be valid JSON, though it does allow comments.

You can start with the following example

.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 GPLint​

On a terminal, run the following code

gplint tests/features