Skip to content

Changelog

All notable changes to the "vscode-gherkin-powertools" extension will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

Added

  • Scenario Outline Parameter Autocomplete: Typing < inside a step within a Scenario Outline will now automatically parse the block and provide an IntelliSense dropdown with the column headers from the underlying Examples table. Selecting a parameter automatically appends the closing > bracket.

[1.7.1] - 2026-07-13

Performance ⚡️

  • Turbocharged Activation (Esbuild): Migrated the build system from standard TypeScript (tsc) to Esbuild. The extension now bundles all source code and dependencies into a single minified extension.js file, slashing the .vsix payload size and dropping activation times to a flat 0ms.

Added

  • Tag Blast Radius Hover: Hovering over any Gherkin tag (@tag) now dynamically calculates and displays the total number of scenarios affected by that tag across the entire workspace, taking into account Feature/Rule tag inheritance and multiplying by Scenario Outline data rows.
  • Gherkin PowerTools Output Channel: Added a native VS Code Output Channel for transparent logging. Users can now monitor cache indexing progress, parser fallback events, and trace syntax errors without needing Developer Tools.
  • Enterprise-Grade Testing: Drastically expanded the testing architecture to achieve a 92.7% Code Coverage.
  • Expanded unit tests to strictly cover edge cases in AST Fallbacks, Code Actions, and Symbol Caching.
  • Implemented 8 comprehensive Headless E2E scenarios via @vscode/test-electron covering real UI interactions (Hover, Definition, Quick Fixes, Autocomplete).

Security

  • Strict Webview CSP: Hardened the Statistics Dashboard Webview by implementing a strict Content Security Policy (<meta http-equiv="Content-Security-Policy">), preventing inline script execution and complying with top-tier VS Code security standards.

[1.7.0] - 2026-07-10

✨ Features

  • Hover Provider (Documentation Preview):
  • Displays the Python function signature and docstring in a rich tooltip when hovering over a Gherkin step.
  • Automatically parses multiline function definitions and docstrings in Python to provide accurate context without switching files.
  • Smart Autocompletion Provider (IntelliSense):
  • Dynamically extracts string patterns from Python step definitions (@given, @when, etc.).
  • Instantly offers intelligent auto-complete suggestions the moment a user types a keyword.
  • Automatically transforms Behave parameters ({var}) and regex groups into VS Code interactive Snippet variables (${1:var}) for fast tabbing.
  • Smoothly overwrites typed text after the keyword instead of duplicating.

Added

  • Symbol Cache: Dramatically improved the performance of the "Go To Definition" feature in large projects. The extension now builds an in-memory index of all Python step definitions upon activation and dynamically updates it when files are modified, reducing lookup times to 0 milliseconds and eliminating continuous disk I/O.
  • Code Actions (Quick Fixes): The extension now provides VS Code Quick Fixes (💡) for Gherkin files.
  • Undefined Steps: Integrates with the Symbol Cache. If a step is not found in Python, a Quick Fix lets you automatically generate an empty Python step definition in your steps/ directory.
  • Syntax Error Auto-Corrections: If you miss a colon on a block keyword (Feature, Scenario) or misspell a step keyword (Givn), Quick Fixes will offer to instantly auto-correct them.
  • Structure Auto-Corrections: If you add Examples: under a standard Scenario, a Quick Fix will offer to convert it to a Scenario Outline.
  • Table Auto-Corrections: If you forget to close a data table row with a pipe (|), a Quick Fix will offer to append it for you.
  • Fault-Tolerant Linter Engine:
  • Syntax Crash Resilience: The Linter now employs a multi-pass hybrid parsing strategy. If severe syntax errors (like typos) crash the official AST parser, the Linter seamlessly falls back to a custom text-based scanner to continue providing structural diagnostics (like detecting Examples inside a standard Scenario).
  • Precise Error Mapping: Solved an issue where the AST parser would strip empty lines from description blocks, causing diagnostics (like missing colons) to point to the wrong lines. The extension now uses dynamic text-mapping to anchor errors to their exact physical line in your document.

Security

  • Dependency Override: Forced serialize-javascript to version ^7.0.5 via npm overrides to mitigate a critical Remote Code Execution (RCE) vulnerability (CVE-2020-7660 incomplete fix) caused by unescaped RegExp flags and Date properties. This secures the test framework (mocha) without requiring a major framework downgrade.

[1.6.0] - 2026-06-29

Added — AST Parsing Engine (Core)

  • Mathematical Precision: Replaced the legacy Regex-based parser with the official @cucumber/gherkin Abstract Syntax Tree (AST) parser. This brings flawless, mathematical precision to code analysis.
  • Bulletproof Formatting: Formatting rules now correctly ignore keywords embedded inside """ DocStrings, | Data Tables, and # Comments, preventing catastrophic layout breakages on complex files.
  • Diagnostics Reliability: The Live Linter now uses the AST to surface syntax errors (like missing colons or invalid tokens) in real-time with 100% accuracy.

Added — Omega Squeeze (Project Analytics V6)

  • Project Analytics: Completely redesigned the Gherkin: Show Project Statistics dashboard with a premium glassmorphism interface and animated dynamic numbers.
  • Code Actions (Quick Fixes): The extension now provides VS Code Quick Fixes (💡) for Gherkin files.
  • Undefined Steps: Integrates with the Symbol Cache. If a step is not found in Python, a Quick Fix lets you automatically generate an empty Python step definition in your steps/ directory.
  • Syntax Error Auto-Corrections: If you miss a colon on a block keyword (Feature, Scenario) or misspell a step keyword (Givn), Quick Fixes will offer to instantly auto-correct them.
  • Structure Auto-Corrections: If you add Examples: under a standard Scenario, a Quick Fix will offer to convert it to a Scenario Outline.
  • Table Auto-Corrections: If you forget to close a data table row with a pipe (|), a Quick Fix will offer to append it for you.
  • Gherkin Quality Score (GQS): Added a proprietary algorithm to evaluate code quality based on Reusability (Backgrounds), Parametrization (Examples), Documentation (Comments), and Complexity (Avg Steps per Scenario).
  • Automation ROI Tracking: Added a new metric to calculate the estimated manual hours saved by your automated tests, using the exact number of executable permutations.
  • Tags Intelligence: Added in-memory tracking of all tags to display a "Top 5 Most Used Tags" leaderboard.
  • Density Metrics: The dashboard now calculates the exact line density of your feature files, checking empty lines vs code lines.

Added — Community & Open Source Infrastructure

  • Issue Templates: Added bug_report.yml (with Gherkin-specific fields and VS Code version) and feature_request.yml via GitHub Issue Forms.
  • Pull Request Template: Added pull_request_template.md with testing matrix tailored for VS Code extension development.
  • Dependabot: Added dependabot.yml for automated weekly dependency updates (npm + GitHub Actions).
  • CODE_OF_CONDUCT.md: Added Contributor Covenant Code of Conduct.
  • SECURITY.md: Added security policy with coordinated disclosure process.
  • .editorconfig: Added EditorConfig with rules for TypeScript (4 spaces), JSON/YAML (2 spaces), and .feature files (2 spaces).

Added — CI/CD Pipelines

  • PR Labeler (labeler.yml): Auto-labels PRs based on changed file paths (core, documentation, testing, dependencies, DevOps, configuration, assets).
  • PR Hygiene & Intelligence Gate (gate-check.yml): Validates PR title/description and generates AI-powered summaries on every PR.
  • Release (release.yml): Automatically compiles TypeScript, packages .vsix with @vscode/vsce, and creates a GitHub Release on v* tags.
  • Deploy Docs (pages.yml): Deploys MkDocs Material documentation to GitHub Pages on pushes to main.

Added — Documentation Site (MkDocs Material)

  • mkdocs.yml: Full MkDocs Material configuration with deep purple theme, dark/light mode, search, code copy, and Mermaid diagrams.
  • 14 documentation pages: Home, Installation, Configuration, 7 feature pages (Formatter, Linter, Go To Definition, Outline, Statistics, Highlighting, Snippets), Architecture (with Mermaid diagrams), Contributing, Code of Conduct, Security, and Changelog.
  • Documentation will be deployed to https://carlos-camara.github.io/vscode-gherkin-powertools/.

Changed

  • src/formatter.ts: Prefixed unused parameters with underscore (_options, _token) to suppress TypeScript lint warnings.
  • src/highlighter.ts: Replaced raw hex colors with professional VS Code native palette (#C586C0, #569CD6, #4EC9B0).
  • src/definition.ts: Removed unused path import.
  • src/linter.ts: Removed unused inTable variable.
  • src/outline.ts: Prefixed unused _token param, narrowed return type to DocumentSymbol[].
  • src/statistics.ts: Prefixed unused _context parameter.
  • README.md & CONTRIBUTING.md: Complete rewrite with modern layout, feature showcase with GIF/PNG demos, configuration table, roadmap section, and author footer. Upgraded to use native GitHub Alerts (> [!NOTE]).
  • Documentation (docs/): Upgraded all markdown pages to use MkDocs Admonitions (!!! tip) and visual emojis.
  • Packaging: Highly optimized .vscodeignore to exclude heavy docs/ and assets/ folders, dropping the .vsix payload size from 18 MB to 408 KB while maintaining functional URLs in the Marketplace.
  • Testing: Upgraded integration tests to run on Node 22 via @vscode/test-electron@3.0.0.
  • Internal / CI:
  • Migrated tests from custom programmatic Mocha runner to the official @vscode/test-cli.
  • Removed nyc in favor of built-in c8 V8 coverage reporting.
  • Migrated code coverage reporting in Pull Requests to a reusable GitHub Action from the qa-hub-actions repository (replacing the local bash script to maximize modularity).

Fixed

  • Packaging: Removed node_modules/** from .vscodeignore so the AST parser runtime dependencies are correctly bundled in the VSIX.
  • Go To Definition: Fixed greedy Regex matching that consumed entire lines in Behave steps.
  • Go To Definition: Added support for Python string literal prefixes (r, u, f, b) in @given, @when, @then decorators.
  • Go To Definition: Fixed escaping of * in the Regex generator to prevent ReDoS and matching failures.

[1.5.0] - 2026-06-25

Added

  • Multi-language Support (i18n): Formatter now fully supports formatting, indenting, and Auto-Casing for English, Spanish, French, and German Gherkin keywords.
  • Diagnostic Provider (Linter): Hardened the linter rules to strictly enforce colons (:) on block keywords and spaces on step keywords, immediately flagging syntax errors.
  • Cascading Indentation: The formatter now uses a beautiful cascading (stair-step) indentation style by default: 2 spaces for Scenario, 3 for Given/When/Then, and 4 for And/But.
  • Inline Comment Alignment: Formatter now dynamically aligns inline comments (#) to the same vertical column for perfect visual readability.
  • Outline Provider: Added an interactive tree view in the VS Code "Outline" panel for quick navigation between Feature, Rule, and Scenario blocks.
  • Context Menu Command: Added a "Format Gherkin Document" action to the editor's right-click context menu.
  • Snippets: Bundled comprehensive autocompletion snippets for common Gherkin blocks (feature, scenario, outline, rule).
  • Configuration gherkinPowerTools.tags.format: Added option to format tags either as wrap (80 chars max line length) or singleLine.
  • Configuration gherkinPowerTools.emptyLines.betweenScenarios: Added setting to customize the exact number of blank lines to enforce between major blocks.
  • Go to Definition (Python/Behave): You can now Cmd + Click (or F12) on any Gherkin step (e.g. Given I login) and VS Code will automatically search your steps/ folder and jump directly to the Python .py file where that @given or @step decorator is defined.
  • Project Statistics Dashboard: Added a new command (Gherkin: Show Project Statistics) that scans your workspace and displays a beautiful HTML dashboard with metrics on your Features, Rules, and Scenarios. This is also accessible by Right-Clicking inside the editor.
  • Beautiful Syntax Highlighting: Overrides default VS Code themes to dynamically colorize Gherkin files. Features a stunning Magenta for structural keywords (Feature, Scenario, Rule) and Blue for action steps (Given, When, Then).
  • Real-time Diagnostic Linter: Includes a built-in Linter that monitors your feature files as you type. If you mistype a keyword or use invalid syntax, the editor will immediately underline it in red and provide an explanation.
  • Built-in Snippets: Includes standard autocompletion snippets. Type feature, scenario, outline, or rule inside a blank document and press Tab to instantly scaffold properly formatted templates.

Changed

  • Refactored internal formatting engine to use dynamic Regex mapping for multi-language support.
  • Excluded development dependencies and test artifacts (.vscode-test, node_modules) from the VSIX package via .vscodeignore.

[1.4.0] - 2026-06-24

Added

  • Auto-Casing: Formatter now automatically PascalCases Gherkin keywords (Given, When, Then, Feature, etc.) regardless of user input.
  • Tag Sorting & Formatting: Sorts tags alphabetically (e.g., @smoke @api -> @api @smoke) and formats them based on user configuration. By default, it wraps tags if they exceed 80 characters, but this can be configured to remain on a single line.
  • Whitespace Cleanup: Automatically collapses consecutive empty lines into a standardized format and trims all trailing whitespace, preventing dirty git commits.
  • Inline Comment Alignment: Dynamically aligns inline comments (#) to the same vertical column within the same code block, creating a beautiful and consistent reading experience.
  • Variable Normalization: Automatically trims useless spaces inside Scenario Outline variables (e.g. < user name > becomes <user name>) to prevent runner failures.

[1.3.0] - 2026-06-24

Added

  • Configuration Settings: Added support for customizing the formatter via settings.json.
  • gherkinPowerTools.indentation.steps: Allows changing step indentation (e.g. from 4 to 2 spaces).
  • gherkinPowerTools.tables.alignToKeyword: Allows toggling the dynamic table alignment behavior.

[1.2.0] - 2026-06-24

Added

  • Format Selection Support: Implemented DocumentRangeFormattingEditProvider. Now you can highlight a specific block of text (like a single table) and format only that section without touching the rest of the file using Cmd+K Cmd+F (Ctrl+K Ctrl+F).

[1.1.0] - 2026-06-24

Added

  • Smart Block Spacing: Automatically ensures exactly one blank line before major blocks (Scenarios, Rules, Backgrounds, Tags).
  • Dynamic Table Alignment: Tables now automatically inherit the exact indentation level of their preceding keyword.

[1.0.0] - 2026-06-24

Added

  • Initial release.
  • Core Gherkin indentation formatting engine.
  • Intelligent data table alignment algorithm.
  • Integration with VS Code DocumentFormattingEditProvider.