Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pedrotroller/kawaii

A Kawaii and small tool to fix and validate gherkin code styles.
https://github.com/pedrotroller/kawaii

behat cucumber feature formatting gherkin

Last synced: 6 days ago
JSON representation

A Kawaii and small tool to fix and validate gherkin code styles.

Awesome Lists containing this project

README

        

Kawaii - Gherkin Formatter
==========================

*This package is a fork of the awesome [malukenho/kawaii-gerkin](https://github.com/malukenho/kawaii-gherkin) package made by Jefersson NATHAN ([@malukenho](http://github.com/malukenho)).*

**Kawaii** is a small tool to fix and verify gherkin code style.

### Installing

```sh
$ composer require --dev pedrotroller/kawaii
```

### Analyzing code

To analyze code style, simple run:

```sh
$ vendor/bin/kawaii check [--align [right|left]]
```

### Fixing code

To fix code style, simple run:

```sh
$ vendor/bin/kawaii fix [--align [right|left]]
```

# Example

### Before

```gherkin
@users

@another-feature
@kawaii
Feature: User registration
In order to order products
As a visitor
I need to be able to create an account in the store

Background: Nice Background
Given store has default configuration
And there are following users:
| email | password |
| [email protected] | foo1sasdasdasdadsasd |
And the following customers exist:
| email |
| [email protected] |
And the following zones are defined:
| name | type | members |
| Poland | country | Poland |
And the following orders exist:
| customer | address |
| [email protected] | Jan Kowalski, Wawel 5 , 31-001, Kraków, Poland |
```

### After

```gherkin
@users @another-feature @kawaii
Feature: User registration
In order to order products
As a visitor
I need to be able to create an account in the store

Background: Nice Background
Given store has default configuration
And there are following users:
| email | password |
| [email protected] | foo1sasdasdasdadsasd |
And the following customers exist:
| email |
| [email protected] |
And the following zones are defined:
| name | type | members |
| Poland | country | Poland |
And the following orders exist:
| customer | address |
| [email protected] | Jan Kowalski, Wawel 5 , 31-001, Kraków, Poland |
```

### Maintainer

- Pierre PLAZANET ([@pedrotroller](http://github.com/pedrotroller))