Skip to content

Rules Reference

behave-lint ships with 41 built-in rules across 6 categories.

Categories

Prefix Category Default Severity Rules
BC Correctness ERROR 10
BD Step Definitions WARNING 5
BK Consistency WARNING/INFO 5
BX Complexity WARNING 6
BS Style WARNING 8
BP Pedantic INFO 7

Auto-fixable rules

Rule Fix Safety
BC004 Replace invalid tag characters with _ Safe
BD004 Convert {param}<param> Safe
BD005 Remove trailing punctuation Safe
BS001 Convert tags to snake_case Safe
BS006 Capitalize step keywords Safe
BS007 Remove trailing whitespace Safe
BS008 Convert tabs to spaces Safe

See the Auto-Fix guide for details.

Rule IDs

Rule IDs use a two-letter prefix followed by a three-digit number:

  • BC — Correctness (definitively wrong structures)
  • BD — Step Definitions (step pattern issues)
  • BK — Consistency (cross-scenario consistency)
  • BX — Complexity (overly complex features)
  • BS — Style (style and convention)
  • BP — Pedantic (strict best practices)