A command line linter and formatter for cucumber features
gem install cucumber_lint
cucumber_lint # Lints (exits with status 1 on failure, 0 on success)
cucumber_lint --fix # Fixes all lint errors
Create a cucumber_lint.yml
file in the same folder that contains your features
directory.
Override the default config to disable a rule or change the enforced style.
- requires empty lines to be used consistently throughout features
- requires all table headers to have the same style
- supported styles: uppercase and lowercase
- scenario outline placeholders must share the same style
-
requires leading and trailing space around the cell content and the pipes to be aligned
# Bad # Bad # Good |VEGETABLE|CODENAME| | VEGETABLE | CODENAME | | VEGETABLE | CODENAME | |Asparagus|Alpha| |Asparagus | Alpha | | Asparagus | Alpha | |Broccoli|Bravo| |Broccoli | Bravo | | Broccoli | Bravo | |Carrot|Charlie| | Carrot| Charlie | | Carrot | Charlie |
- empty
.feature
files are not allowed
-
Use
And
instead of repeatingGiven
,When
, orThen
# Bad # Good Given A Given A Given B And B When C When C When D And D Then E Then E Then F And F