Gherkin Lint
VS Code extension that provides real-time linting for Gherkin .feature files.
Features
Diagnostics appear as squiggly lines in the editor and in the Problems panel:
| Rule |
Severity |
Description |
no-duplicate-qase-id |
Error |
Duplicate @QaseID=N across all files |
no-wip-tag |
Warning |
@wip tag left in feature file |
no-empty-feature |
Error |
Feature with no scenarios |
no-empty-scenario |
Error |
Scenario with no steps |
require-title-format |
Error |
Scenario with Examples missing # title-format: comment |
Linting runs automatically when:
- The workspace is opened (if
.feature files exist)
- Any
.feature file is saved
Requirements
This extension calls the gherkin-lint CLI from your workspace via npx.
Make sure @korsit/gherkin-lint is installed as a dependency in your project.
Configuration
| Setting |
Default |
Description |
gherkinLint.enable |
true |
Enable or disable linting |
gherkinLint.cwd |
apps/integration-tests |
Working directory for the linter |
Override in your .vscode/settings.json:
{
"gherkinLint.cwd": "apps/integration-tests"
}
Publishing
npm install -g @vscode/vsce
vsce login korsit
vsce package # creates .vsix
vsce publish # publishes to marketplace
| |