A configurable linter and validator for Gherkin feature files, written in JavaScript.
Gherkin-lint is a linter and validator for Gherkin feature files, the human-readable language used in behavior-driven development (BDD) frameworks like Cucumber. It analyzes feature files for style violations, structural issues, and potential errors, helping teams maintain clean and consistent specifications. The tool offers a comprehensive set of configurable rules to enforce best practices across naming, formatting, tags, and syntax.
Developers, QA engineers, and product teams using Cucumber or other BDD frameworks who write and maintain Gherkin feature files as part of their testing or specification process.
It provides a dedicated, highly configurable linting solution for Gherkin that catches common mistakes and enforces team conventions automatically, improving the readability and reliability of behavior-driven specifications. Unlike general-purpose linters, it understands Gherkin's specific syntax and BDD context.
A Gherkin linter/validator written in javascript
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Includes over 30 built-in rules covering syntax, style, and structure, such as 'keywords-in-logical-order' and 'scenario-size', which enforce comprehensive BDD best practices.
Rules can be enabled, disabled, and customized via a .gherkin-lintrc JSON file, allowing fine-tuning for team standards, like setting 'indentation' or 'name-length' parameters.
Supports writing and loading custom rules from external directories, enabling teams to create bespoke checks, as demonstrated in the README's custom rules section.
Built on the official Gherkin JavaScript parser, ensuring reliable syntax analysis and compatibility with Gherkin specifications, reducing false positives.
Rules like 'no-tags-on-backgrounds' and 'one-feature-per-file' cannot be turned off, as they prevent parser crashes, which may conflict with specific workflow needs or legacy codebases.
Advanced rule setup, such as 'no-restricted-patterns' or custom rules, requires understanding JSON schemas and may have a steep learning curve for non-technical team members.
Primarily a command-line tool with no built-in support for real-time linting in popular IDEs, relying on external plugins or manual integration for in-editor feedback.