Quick Start
July 3, 2026 · View on GitHub
Lint your feature files
Navigate to your Behave project and run:
behave-lint features/
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
behave-lint features/ --select BC001,BC004,BS001
Ignore rules
behave-lint features/ --ignore BP001,BP002
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:
behave-lint features/ --fix
Include unsafe fixes (e.g. inserting placeholder content):
behave-lint features/ --fix --unsafe-fixes
See the Auto-Fix guide for details.
Watch mode
Re-lint automatically when feature files change:
behave-lint features/ --watch
Requires watchdog — install with pip install behave-lint[watch].
List available rules
behave-lint --list-rules
Explain a specific rule
behave-lint --explain BC004
Next steps
- Configuration — set up
pyproject.toml - Output Formats — console, JSON, SARIF, Markdown, GitHub
- Rules Overview — browse all 50 built-in rules
- Auto-Fix — 14 auto-fixable rules
- Watch Mode — re-lint on changes
- CI/CD Integration — automate in your pipeline