Profiles¶
Profiles are predefined rule sets that make it easy to configure
behave-lint for common use cases without listing individual rule IDs.
Built-in profiles¶
| Profile | Description | Rules enabled |
|---|---|---|
recommended |
All rules except pedantic (BP). Good default for most projects. | 34 rules (BC, BD, BK, BX, BS) |
strict |
All rules including pedantic. Maximum enforcement. | 41 rules (all) |
minimal |
Only correctness and step-definition rules. Catches real bugs only. | 15 rules (BC, BD) |
Usage¶
CLI¶
# Use the recommended profile
behave-lint features/ --profile recommended
# Use the strict profile (all rules)
behave-lint features/ --profile strict
# Use the minimal profile (correctness + step definitions only)
behave-lint features/ --profile minimal
Configuration file¶
In pyproject.toml:
Environment variable¶
Precedence¶
Profiles are resolved early in the configuration pipeline, after
built-in defaults but before pyproject.toml and CLI overrides.
This means:
--selectand--ignorefrom CLI or config override the profile'sselect/ignorelists.- A profile specified in
pyproject.tomlis overridden by--profileon the CLI.
Combining with --select and --ignore¶
You can combine a profile with explicit --select or --ignore:
# Use recommended profile but also enable BP001
behave-lint features/ --profile recommended --select BP001
# Use strict profile but disable BX001
behave-lint features/ --profile strict --ignore BX001
When --select is specified, it replaces the profile's select list.
When --ignore is specified, it replaces the profile's ignore list.
Default behavior¶
If no profile is specified, behave-lint enables all non-experimental,
non-deprecated rules by default (equivalent to recommended without
the pedantic exclusions).