Changelog¶
[1.0.1] - 2025-07-02¶
Added¶
python -m behave_formatsupport via__main__.py--stdinflag: read from stdin, write formatted output to stdout (editor integration)--indentflag: override indentation from CLI without editing pyproject.toml--versionflag showingbehave-format <version>Settings.with_indent()method for immutable indent override- behave-format as a local pre-commit hook in
.pre-commit-config.yaml - CI, Docs, PyPI, Python versions, and License badges in README
Fixed¶
- Comments now preserved in output for features, rules, scenarios, scenario outlines, and steps
# language:directive preserved for non-English features- CLI error handling: file-not-found and parse errors now exit with code 2 instead of crashing
format_featurenow applies align stage for pipeline consistency withformat_project_align_tablesignature bug fixed (examples_table kwarg mismatch)render_featureandrender_projectnow include trailing newline for consistency with CLI output
[1.0.0] - 2025-07-02¶
Added¶
- Initial release of behave-format
- Opinionated, deterministic formatter for Behave
.featurefiles - Consumes
behave-model.Projectas input (no direct Gherkin parsing) - Formatting pipeline: normalize → sort → align → print
- Tags sorted alphabetically by default
- Table column alignment
- Whitespace normalization (trailing spaces, indentation)
- CLI with
--check(CI mode),--diff, and write modes - Configuration via
pyproject.tomlunder[tool.behave-format] - Golden file tests, idempotency tests, CLI tests, performance tests
- GitHub Actions CI workflow (lint, test, coverage, packaging)
See CHANGELOG.md on GitHub for the full changelog.