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 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 |
.feature
files are not allowedUse And
instead of repeating Given
, When
, or Then
# 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