Changelog¶
All notable changes to behave-lint will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]¶
[2.5.0] - 2026-10-02¶
Fixed¶
- Rule parameters —
[tool.behave-lint.rules.<RULE>]tables were never read: the configurable rules (BX001–BX006, BP003, BP004) consulted a nonexistentconfig.rulesfield. They now readconfig.rule_params, and kebab-case parameter keys (max-steps) are normalized tomax_steps. - BC005 duplicate-feature-names — cross-file rules received
project=Noneand never produced diagnostics. The engine now builds aProjectmodel containing every parsed feature. - Cache path misattribution — files sharing identical content could report diagnostics under another file's path. Cached diagnostics are re-stamped with the requesting file path, and the tool version now participates in the config hash.
- Parse errors vs
--select—B000diagnostics were filtered by rule selection; syntax errors are now always reported. - Inline disables —
# behave-lint: off BSEC001did not match the two-letter regex and silently disabled all rules. Longer prefixes (BSEC, BI18N, BACC) are now supported. Inline disables were also not wired at all: the engine now feeds file contents to the collector. exclude— configured excludes were dropped twice (CLI never passed them, and the collector filtered against an empty list). Plain directory prefixes likefeatures/wip/now work, and file discovery is extension case-insensitive.- Configured defaults ignored —
paths,output,output-fileandfail-onfrompyproject.tomlwere overridden by CLI defaults. CLI flags now only override when explicitly provided. - Group
stylematched BSEC rules — prefix matching made thestylegroup selectBSEC*. Group expansion now matches on the rule's declared category. - Plugin reporters/config —
behave_lint.reportersentry points are registered with the reporter manager, andbehave_lint.configproviders can inject configuration overrides. Thepluginsconfig map now enables/disables plugins ("*" = falsedisables all unlisted ones). - Version drift —
version.py,__init__.py, the LSP server andpyproject.tomldisagreed.version.pyis now the single source of truth ([tool.hatch.version]). - LSP — server version is no longer hardcoded;
didChangeno longer applies incremental edits twice (pygls already applies them); quick-fix edits reaching the last line are clamped to the document end. - Watch mode — delete/rename events now trigger re-linting, and the exit code reflects the worst run, not the first.
- GitHub reporter — file paths and messages are now escaped per the workflow-command spec.
Added¶
- New CLI flags:
--exclude,--dry-run(preview fixes),--jobs(thread pool size). --statisticsprints a summary (diagnostics, rules, cache hits/misses);--verbosereports paths and plugins;--color/--no-colorcontrol console coloring.extendsis now implemented: a[tool.behave-lint]file can inherit from another config file (relative path, chained, with cycle detection).max-warningsis enforced: exit code 1 when warnings exceed it.BEHAVE_LINT_CONFIGandBEHAVE_LINT_TRACEenvironment variables are now honored.- New
complexityrule group (was missing for the BX category). step-definitionsnow works: point it at yoursteps/directory and BD001 reports steps with no matching@given/@when/@then/@steppattern, while BD002 reports steps matching more than one definition. Definitions are extracted withast— Python modules are never imported.- SARIF output now emits real rule names/descriptions, and every
diagnostic carries a
doc_urlpointing at its rules page.
[2.4.0] - 2025-07-04¶
Added¶
- Security category (
BSEC): 3 new rules —BSEC001hardcoded secrets,BSEC002URL with embedded credentials,BSEC003sensitive tags. - Internationalization category (
BI18N): 3 new rules —BI18N001hardcoded date/time formats,BI18N002hardcoded currency symbols,BI18N003non-ASCII step text. - Accessibility category (
BACC): 3 new rules —BACC001ableist language,BACC002missing accessibility scenarios for UI features,BACC003color-only information. - New
Categoryenum members:SECURITY,I18N,ACCESSIBILITY. - New category groups:
security,i18n,accessibility. - 39 new tests for the 9 new rules.
- Rule ID validation pattern updated to support alphanumeric prefixes (e.g.,
BI18N).
Changed¶
- Total built-in rules: 50 (was 41).
- Category execution order updated to include new categories.
[2.3.0] - 2025-07-03¶
Added¶
- Incremental document sync (
TextDocumentSyncKind.Incremental) in LSP server — applies partial range-based changes efficiently. _apply_content_changesfunction handles both full-document and partial range-based changes.content_overrideparameter in_publish_diagnosticsfor incremental sync.- 7 new tests for incremental sync (full replace, insert at start, replace mid-line, replace entire line, multi-line, insert at end, sequential changes).
Changed¶
TextDocumentSyncKindchanged fromFulltoIncremental.did_changehandler now applies incremental changes before linting.
[2.2.0] - 2025-07-03¶
Added¶
workspace/didChangeConfigurationhandler in LSP server — readsselect,ignore,profile,group,severityOverrides, andruleParamsfrom editor settings._build_config_from_workspacemerges editor settings withpyproject.tomland defaults viaload_config.- Re-lints all open
.featuredocuments when workspace config changes. - 4 new tests for workspace config (defaults, ignore, profile, select).
- LSP docs updated with editor configuration section, settings table, and VS Code/Neovim examples.
[2.1.0] - 2025-07-03¶
Added¶
textDocument/codeActionsupport in LSP server — returnsQuickFixactions withTextEdits for all 14 auto-fixable rules._fix_edit_to_text_editconversion from behave-lintFixEditto LSPTextEdit.- Fix cache (
_fix_cache) stores fixes per URI, cleared ondidClose. - 6 new tests for codeAction (fix edit conversion, fix collection, fix cache).
[2.0.1] - 2025-07-03¶
Fixed¶
- LSP server now registers built-in rules before linting (was producing 0 diagnostics).
[2.0.0] - 2025-07-03¶
Added¶
- LSP server (
behave-lint-lsp) for real-time diagnostics in VS Code, Neovim, Emacs. pyglsandlsprotocolas optional dependencies (pip install behave-lint[lsp]).behave-lint-lspentry point for stdio LSP transport.- Full document sync (
textDocument/didOpen,didChange,didSave,didClose). - Severity mapping from behave-lint to LSP DiagnosticSeverity.
- 13 tests for LSP server (diagnostic conversion, content linting, server creation, publish).
- LSP documentation with VS Code, Neovim, and Emacs configuration examples.
Changed¶
- Bumped GitHub Actions:
actions/checkoutv4 → v7,actions/upload-artifactv4 → v7,actions/upload-pages-artifactv3 → v5,softprops/action-gh-releasev2 → v3.
[1.9.0] - 2025-07-03¶
Added¶
- Watch mode (
--watchflag) — re-lints.featurefiles automatically on change. watchdogas optional dependency (pip install behave-lint[watch]).- Debounce logic to prevent rapid re-linting on burst writes.
- 14 new tests for watch mode (unit + integration with mocked observer).
- Updated CLI reference docs with watch mode section and example.
[1.8.0] - 2025-07-03¶
Added¶
- Auto-fix support for BP001 (missing-scenario-tags) — inserts
@smoketag (UNSAFE). - Auto-fix support for BP005 (missing-examples-name) — appends
Valid valuesname (UNSAFE). - Auto-fix support for BP006 (missing-feature-description) — inserts As a / I want / So that template (UNSAFE).
- 11 new tests for pedantic auto-fixes.
- Updated auto-fix documentation with BP001, BP005, BP006 examples.
[1.7.0] - 2025-07-03¶
Added¶
- Cookiecutter plugin template — scaffolds a complete plugin project
with rule skeleton, tests, README, and entry points.
Usage:
cookiecutter gh:MathiasPaulenko/behave-lint --directory templates/cookiecutter-plugin - Template supports optional auto-fix skeleton (
include_auto_fix). - 7 new tests verifying template generation and importability.
- Documentation: updated plugin development guide with quick start.
[1.6.0] - 2025-07-03¶
Added¶
- Incremental cache — skip rule execution for unchanged files. SHA-256 content hashing + config hash for automatic invalidation.
- New
behave_lint.cachemodule withCacheManager. --no-cacheand--clear-cacheCLI flags now functional.cache_hitsandcache_missespopulated inLintSummary.- Documentation:
docs/usage/cache.md.
[1.5.1] - 2025-07-03¶
Added¶
- Auto-fix metadata declared for BS001 (tag casing), BS006 (step keyword casing), BS007 (trailing whitespace), BS008 (tab indentation), BC004 (invalid tag syntax), BD004 (step parameter convention), BD005 (step trailing punctuation) — all SAFE.
- Auto-fix support for BS004 (background name) — UNSAFE, inserts
Background: Common setupas a placeholder name. - Tests for all newly declared auto-fix metadata and BS004 fix.
Fixed¶
- Documentation workflow: duplicate
github-pagesartifact caused by bothbuildanddeployjobs uploading. Now onlybuilduploads. - Added
workflow_dispatchtrigger to docs workflow for manual runs.
[1.5.0] - 2025-07-03¶
Added¶
- Rule groups — select rules by category or tag via
--groupCLI flag,groupconfig key, orBEHAVE_LINT_GROUPenv var. - 5 category-based groups:
correctness,style,pedantic,step-definitions,consistency. - 10 tag-based groups:
naming,tags,steps,background,description,documentation,formatting,examples,scenarios,readability. - Groups are additive — they merge with explicit
--selectrules and can be combined with profiles. - New
groupfield inConfigandCLIArgs. - New
behave_lint.configuration.groupsmodule with group definitions and validation. - Documentation:
docs/usage/groups.md.
[1.4.0] - 2025-07-03¶
Added¶
- Auto-fix support for BS002 (keyword ordering) — reorders steps to
Given-When-Then order (UNSAFE, requires
--unsafe-fixes). - Auto-fix support for BS003 (step phrasing) — replaces first-person
"I" with "the user", handling common conjugations like "I am" →
"the user is" and "I've" → "the user has" (SAFE,
--fix). - Auto-fix support for BS005 (feature description) — inserts a
template description ("As a [role] / I want to [action] / So that
[benefit]") after the Feature line (UNSAFE, requires
--unsafe-fixes). - Updated
auto_fixmetadata for BS002, BS003, and BS005 rules.
[1.3.2] - 2025-07-03¶
Fixed¶
- Fix
test_profile_shown_in_helpfailing on CI by stripping ANSI codes and adding direct command parameter verification.
[1.3.1] - 2025-07-03¶
Fixed¶
- Fix
test_profile_shown_in_helpfailing on CI due to ANSI color codes in Typer's Rich-rendered help output (usecolor=Falsein CliRunner).
[1.3.0] - 2025-07-03¶
Added¶
- Profiles/Presets — built-in rule profiles for common use cases:
recommended— all rules except pedantic (34 rules).strict— all rules including pedantic (41 rules).minimal— only correctness and step-definition rules (15 rules).- New
--profileCLI flag. - New
profileconfig key inpyproject.toml. - New
BEHAVE_LINT_PROFILEenvironment variable. - New Profiles guide in documentation.
[1.2.1] - 2025-07-03¶
Fixed¶
- Apply
ruff formatto new rule files (fixes CI format check).
[1.2.0] - 2025-07-03¶
Added¶
- 10 new built-in rules (31 → 41 total):
- BC007:
empty-scenario— detects scenarios with no steps. - BC008:
unused-outline-placeholder— detects unused Examples columns. - BC009:
undefined-outline-placeholder— detects undefined<param>placeholders. - BC010:
duplicate-examples-name— detects duplicate Examples names. - BS006:
step-keyword-casing— enforces capitalized step keywords (auto-fixable). - BS007:
trailing-whitespace— detects trailing whitespace (auto-fixable). - BS008:
tab-indentation— detects tab indentation (auto-fixable). - BX006:
feature-file-too-long— detects overly long feature files. - BP006:
missing-feature-description— detects features without a description. - BP007:
scenario-without-assertion— detects scenarios without aThenstep.
[1.1.0] - 2025-07-02¶
Changed¶
- CLI migrated from
argparsetoTyperfor a richer help experience with coloured output, progressive disclosure, and better error messages. CLIArgsdataclass retained for backward compatibility;parse_argsandcreate_parserremoved in favour of the Typerappobject.--jsonand--sarifshortcut flags removed — use--output jsonand--output sarifinstead.- Exit code for invalid CLI flags now correctly returns
2(config error) instead of3(internal error).
Added¶
typer>=0.12as a runtime dependency.run_lint()public function inbehave_lint.cli.coordinatorfor programmatic invocation without going throughmain().FailOnandOutputFormatStrEnumtypes exported frombehave_lint.cli.parser.
Removed¶
create_parser()function frombehave_lint.cli.parser.parse_args()function frombehave_lint.cli.parser.--jsonshortcut flag (use--output json).--sarifshortcut flag (use--output sarif).
[1.0.0] - 2025-07-02¶
Added¶
- Repository bootstrap with complete project skeleton.
pyproject.tomlwith PEP 621 metadata, hatchling build backend, and tooling configuration (Ruff, Mypy, Pytest, Coverage).- Package skeleton with all subpackages per REPOSITORY_DESIGN.md.
- Test skeleton with all test types (unit, integration, golden, snapshot, performance, regression, architecture).
- GitHub workflows for CI, documentation, release, and security.
- MkDocs Material documentation site configuration.
- Pre-commit hooks (Ruff, Mypy, standard hooks).
- Contributing guide, code of conduct, security policy.
- Supported versions and roadmap documents.
- Core domain models:
Diagnostic,Severity,Category,Config. - Rule engine with
RuleExecutor,LintEngine,RuleRegistry. - CLI with
--select,--ignore,--fail-on,--output,--config. - 31 built-in rules across 6 categories (BC, BD, BK, BX, BS, BP).
- 5 output formats: console, JSON, SARIF, Markdown, GitHub Actions.
- Plugin system with entry-point discovery and isolation.
- Auto-fix infrastructure with
FixCoordinatorand conflict resolution. - 4 safe auto-fixes: BC004, BD004, BD005, BS001.
- Full documentation: Getting Started, CLI Reference, Configuration, Auto-Fix guide, Rules catalog, Guides (CI/CD, pre-commit, custom rules, plugin development).
- Runnable example projects: basic-usage, auto-fix, ci-cd, custom-rules.
- Performance benchmark tests with fixture generation (10/100/1000 files).
- Nightly CI workflow for performance benchmarks.
Changed¶
- Version bumped from 0.1.0 to 1.0.0.
- Development status classifier updated from Pre-Alpha to Beta.
- Documentation URL updated to GitHub Pages site.
- Authors updated to include project maintainer.
Removed¶
behave-lint.tomlconfiguration file support (usepyproject.toml[tool.behave-lint]section instead).
[0.1.0] - 2025-01-15¶
Added¶
- Initial repository setup.
- Foundation milestone (M1) preparation.