Skip to content

feat(gherkin-to-asciidoc)!: add indexing DSL property to number features and scenarios - #99

Merged
Arc-E-Tect merged 1 commit into
mainfrom
scenario-indexer
Aug 4, 2026
Merged

feat(gherkin-to-asciidoc)!: add indexing DSL property to number features and scenarios#99
Arc-E-Tect merged 1 commit into
mainfrom
scenario-indexer

Conversation

@Arc-E-Tect

@Arc-E-Tect Arc-E-Tect commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds an indexing DSL property (off/feature/scenario/all) that numbers Feature/Scenario titles directly in the source .feature files. Features are numbered alphabetically by feature file path (a directory's own files before its sub-directories'); scenarios follow the same order, continuously for scenario mode or per-feature (<featureNumber>.<scenarioNumber>) for all. Switching modes - including back to off - strips any previous numbering first, so it's idempotent.
  • indexing requires includeSubDirs = true; feature/all additionally require groupByFeature = true.
  • Breaking change: includeSubDirs and groupByFeature now default to true (previously false). Feature file processing order is now deterministic (alphabetical by path) instead of filesystem-dependent.

…res and scenarios

Adds an `indexing` property (off/feature/scenario/all) that numbers
Feature/Scenario titles directly in the source .feature files,
alphabetically by feature file path, processing a directory's own
files before its sub-directories'. Off strips any numbering left over
from a previous run, so switching modes (including back to off) is
idempotent. feature/all require groupByFeature = true; all four
require includeSubDirs = true.

BREAKING CHANGE: includeSubDirs and groupByFeature now default to
true (previously false). A project relying on the old defaults -
particularly one using sourceFile without explicitly setting
includeSubDirs = false, which will now fail validation - must set
includeSubDirs = false and/or groupByFeature = false explicitly to
keep its previous behaviour. Feature file processing order is also
now deterministic (alphabetical by path, directory files before
sub-directory files) instead of filesystem-dependent, which may
reorder scenarios in existing generated reports.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Arc-E-Tect
Arc-E-Tect merged commit 5c207c4 into main Aug 4, 2026
4 checks passed
@Arc-E-Tect
Arc-E-Tect deleted the scenario-indexer branch August 4, 2026 19:50
Arc-E-Tect added a commit that referenced this pull request Aug 4, 2026
# [2.0.0](v1.6.0...v2.0.0) (2026-08-04)

### ✨ New and updated features

* **example-shadow-api-detector:** add composed RequestMapping example ([#98](#98)) ([6ea5163](6ea5163)), closes [#98](#98)
* **gherkin-to-asciidoc:** add indexing DSL property to number features and scenarios ([#99](#99)) ([5c207c4](5c207c4)), closes [#99](#99)
* **shadow-api-detector:** add OpenAPI 3.2 compatibility support and example ([#95](#95)) ([c57432b](c57432b)), closes [#95](#95)

### 🐛 Bug Fixes

* **gherkin-to-asciidoc:** set systemUnderTestVersion in snippet-templates example ([#94](#94)) ([ca7fb34](ca7fb34)), closes [#94](#94)
* **example-shadow-api-detector:** use official published plugin in examples ([#96](#96)) ([bca72d8](bca72d8)), closes [#96](#96)

### BREAKING CHANGE

* **gherkin-to-asciidoc:** includeSubDirs and groupByFeature now default to
true (previously false). A project relying on the old defaults -
particularly one using sourceFile without explicitly setting
includeSubDirs = false, which will now fail validation - must set
includeSubDirs = false and/or groupByFeature = false explicitly to
keep its previous behaviour. Feature file processing order is also
now deterministic (alphabetical by path, directory files before
sub-directory files) instead of filesystem-dependent, which may
reorder scenarios in existing generated reports.
@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 2.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Arc-E-Tect added a commit that referenced this pull request Aug 5, 2026
…ludeSubDirs/groupByFeature default changes (#101)

PR #99 shipped the indexing DSL property and flipped includeSubDirs/
groupByFeature to default to true, but never touched the plugin's own
README - it still showed the old false defaults everywhere and had no
mention of indexing at all.

Updates the Groovy/Kotlin DSL samples, the configuration properties
table, and the validation notes for the new defaults and the new
property. Adds a "Numbering Features and Scenarios" section describing
all four indexing values, the file processing/numbering order, and a
before/after example, linking to the new indexing example. Updates
"Sample Output"/"Grouping by Feature" to show the new default (grouped)
output first, with groupByFeature = false now documented as the
opt-out.
Arc-E-Tect added a commit that referenced this pull request Aug 5, 2026
…or the whole build (#102)

* docs(gherkin-to-asciidoc): document the indexing property and the includeSubDirs/groupByFeature default changes

PR #99 shipped the indexing DSL property and flipped includeSubDirs/
groupByFeature to default to true, but never touched the plugin's own
README - it still showed the old false defaults everywhere and had no
mention of indexing at all.

Updates the Groovy/Kotlin DSL samples, the configuration properties
table, and the validation notes for the new defaults and the new
property. Adds a "Numbering Features and Scenarios" section describing
all four indexing values, the file processing/numbering order, and a
before/after example, linking to the new indexing example. Updates
"Sample Output"/"Grouping by Feature" to show the new default (grouped)
output first, with groupByFeature = false now documented as the
opt-out.

* feat(gherkin-to-asciidoc): add ci indexing value and a CLI override for the whole build

Adds IndexingMode.CI: unlike OFF, it skips indexing entirely - the
source .feature files aren't touched at all, not even to strip prior
numbering. Adds the -PgherkinToAsciidoc.indexing=<value> project
property, which overrides indexing for every project in the build
regardless of what each project's own gherkinToAsciidoc { } block
configures, matched against IndexingMode case-insensitively. Intended
usage is forcing `ci` in a CI pipeline so generateFeatureDocs never
mutates source files there, without changing any build script.

Documents both in the plugin README (new "Overriding indexing from
the Command Line" subsection, updated tables/validation notes) and
adds a fifth `ci` sub-project to the indexing example, whose feature
files start out already numbered specifically to prove CI leaves
that numbering untouched, plus a walkthrough of the CLI override
forcing all five sub-projects to skip indexing for a single run.

Also fixes a pre-existing bug in the example (introduced when it was
first added): the feature/scenario/all sub-projects' committed
.feature files were left numbered from local verification instead of
the clean baseline the README describes.

Pins the example to gherkin-to-asciidoc = 2.1.0, the version this
purely additive change is expected to release as; verified locally
against the plugin's own source (via a temporary includeBuild, since
removed) before pinning.
Arc-E-Tect added a commit that referenced this pull request Aug 5, 2026
# [2.1.0](v2.0.0...v2.1.0) (2026-08-05)

### ✨ New and updated features

* **gherkin-to-asciidoc:** add ci indexing value and a CLI override for the whole build ([#102](#102)) ([063c069](063c069)), closes [#102](#102) [#99](#99)

### 📝 Documentation

* **gherkin-to-asciidoc:** add multi-project example demonstrating the indexing modes ([#100](#100)) ([a0cd7a7](a0cd7a7)), closes [#100](#100)
* **gherkin-to-asciidoc:** document the indexing property and the includeSubDirs/groupByFeature default changes ([#101](#101)) ([9fe4afd](9fe4afd)), closes [#101](#101) [#99](#99)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant