GithubHelp home page GithubHelp logo

zsoobhan / cucumber_lint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from charlierudolph/cucumber_lint

0.0 0.0 0.0 71 KB

A linter and formatter for cucumber features

License: MIT License

Ruby 53.35% Gherkin 46.65%

cucumber_lint's Introduction

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

cucumber_lint's People

Contributors

charlierudolph avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.