0.01
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
A command line interface for linting and formatting cucumber features
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.7.7
~> 2.12.2
~> 1.11.2
 Project Readme

cucumber_lint

Gem Version Circle CI Dependency Status Code Climate

A command line linter and formatter for cucumber features

Installation

gem install cucumber_lint

Usage

cucumber_lint        # Lints (exits with status 1 on failure, 0 on success)
cucumber_lint --fix  # Fixes all lint errors

Configuration

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.

Rules

consistent_empty_lines
  • requires empty lines to be used consistently throughout features
consistent_table_headers
  • requires all table headers to have the same style
    • supported styles: uppercase and lowercase
    • scenario outline placeholders must share the same style
consistent_table_whitespace
  • 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  |
no_empty_features
  • empty .feature files are not allowed
no_repeating_keywords
  • Use 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