Skip to content

Replace gherkin-utils with gherkin-formatter - #3217

Open
mpkorstanje wants to merge 4 commits into
diffplug:mainfrom
mpkorstanje:change/replace-gherkin-utils-with-gherkin-formatter
Open

mpkorstanje wants to merge 4 commits into
diffplug:mainfrom
mpkorstanje:change/replace-gherkin-utils-with-gherkin-formatter

Conversation

@mpkorstanje

@mpkorstanje mpkorstanje commented Nov 30, 2026 •

Copy link
Copy Markdown

The gherkin-formatter has been extracted out of gherkin-utils. Starting with v13 gherkin-utils no longer contains a formatter. This functionality is now contained in gherkin-formatter.

The gherkin-formatter is a from the ground up rewrite of the formatter from gherkin-utils. It trims empty lines by default, puts sensible spacing around rules, descriptions and has improved comment block heuristics. It also supports custom indentation, and some other configurable features.

To keep the scope under control I've only implemented custom indentation in this PR. Other contributors should feel free to implement the other options.

End users should replace gherkinUtils with gherkinFormatter in their build configuration.

RFC: What is the policy for backwards incompatible changes? I suppose it would be possible to keep a copy of GherkinUtils and GherkinUtilsConfig around a deprecate them somehow.

The gherkin-formatter has been extracted out of gherkin-utils. Starting
with v13 gherkin-utils no longer contains a formatter. This
functionality is now contained in gherkin-formatter.

The gherkin-formatter is a from the ground up rewrite of the formatter
from gherkin-utils. It trims empty lines by default, puts sensible
spacing around rules, descriptions and has improved comment block
heuristics. It also supports custom indentation, and some other
configurable features.

To keep the scope under control I've only implemented custom indentation
in this PR. Other contributors should feel free to implement the other
options.
@mpkorstanje
mpkorstanje marked this pull request as ready for review November 30, 2026 01:16

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant