Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>BDD LintNew to Visual Studio Code? Get it now.
BDD Lint

BDD Lint

Abhinand Raj

|
18 installs
| (0) | Free
Lint Gherkin feature files with bdd-lint rules (tense checks and BDD best practices).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

BDD Lint VS Code Extension

A minimal VS Code extension that runs the bdd-lint CLI on the currently open .feature file and shows results in an output channel.

About bdd-lint

bdd-lint is a linter for Behave BDD scenarios, enforcing grammar and best practices. It supports all major rules from gherkin-lint, custom configuration, user-defined rules, and flexible output formats.

Key Features

  • Runs bdd-lint on open .feature files in VS Code.
  • Highlights grammar and best-practice issues directly in your editor.
  • Supports all major rules from gherkin-lint:
    • Past, present, and future tense checks for Given/When/Then.
    • Scenario structure and naming rules.
    • Duplicate and consistency checks.
    • Tag and keyword formatting.
    • Custom rule support.
  • Custom configuration via .bdd-lint.yml and CLI options.

How the Extension Works

  • The extension calls the bdd-lint console script.
  • Make sure bdd-lint is available in your PATH or workspace Python environment (e.g., install with pip install bdd-lint).
  • The command registered is bdd-lint.run, which you can execute from the command palette or bind to a key.

Usage

  1. Install bdd-lint in your Python environment:
    pip install bdd-lint
    
  2. Open a .feature file in VS Code.
  3. Run the command bdd-lint: Run on feature file from the command palette (Ctrl+Shift+P).

The extension will display lint results in a dedicated output channel.

Supported Rules

Some example rules enforced by bdd-lint:

  • GivenPastTenseRule, WhenPresentTenseRule, ThenFutureTenseRule
  • OneWhenThenRule, ThirdPersonRule, TenseConsistencyRule
  • NoEmptyScenariosRule, NoUnnamedFeaturesRule, NoDuplicateScenariosRule, etc.
  • See the bdd-lint documentation for the full list.

Configuration

To customize which rules are enabled and their options, add a .bdd-lint.yml file to your project root:

rules:
  GivenPastTenseRule: true
  MaxScenariosPerFileRule: true
options:
  MaxScenariosPerFileRule:
    max_scenarios: 5

You can also run the CLI with a custom config:

bdd-lint path/to/feature_file.feature --config custom_config.yml

Custom Rules

Create your own rule Python files in the custom_rules/ directory of your project.
Example rule:

from bdd_lint.rules.base_rule import BaseRule
class MyCustomRule(BaseRule):
    def check(self, scenario):
        # Custom logic
        return []

Extension Development & Publishing

  1. Install vsce (VS Code packaging/publishing tool):
    npm install -g vsce
    
  2. Update package.json (publisher and version).
  3. Package the extension:
    vsce package
    
  4. Publish to the Marketplace:
    vsce publish
    

License

MIT


For more details on rules, configuration, and custom rules, see the main bdd-lint documentation.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft