Quick Start¶
Lint your feature files¶
Navigate to your Behave project and run:
This scans all .feature files under features/ and reports diagnostics
to the console.
Filter by severity¶
By default, behave-lint fails on warnings and errors. Use --fail-on
to change the threshold:
# Only fail on errors
behave-lint features/ --fail-on error
# Fail on any diagnostic (including info)
behave-lint features/ --fail-on info
Select specific rules¶
Ignore rules¶
Output formats¶
# JSON
behave-lint features/ --output json
# SARIF (for GitHub Code Scanning)
behave-lint features/ --output sarif
# Markdown report
behave-lint features/ --output markdown --output-file report.md
Auto-fix¶
Apply safe auto-fixes directly to your feature files:
Include unsafe fixes (e.g. inserting placeholder content):
See the Auto-Fix guide for details.
Watch mode¶
Re-lint automatically when feature files change:
Requires watchdog — install with pip install behave-lint[watch].
List available rules¶
Explain a specific rule¶
Next steps¶
- Configuration — set up
pyproject.toml - Output Formats — console, JSON, SARIF, Markdown, GitHub
- Rules Overview — browse all 41 built-in rules
- Auto-Fix — 14 auto-fixable rules
- Watch Mode — re-lint on changes
- CI/CD Integration — automate in your pipeline