README.md in chutney-1.6.3 vs README.md in chutney-2.0.0.rc1

- old
+ new

@@ -1,48 +1,71 @@ -# Lint Gherkin Files +<h1 align="center"> + <img src="https://raw.githubusercontent.com/BillyRuffian/chutney/master/img/chutney.svg?sanitize=true" alt="Chutney" height="200"> + <br> + Chutney + <br> +</h1> -![CircleCI branch](https://img.shields.io/circleci/project/github/BillyRuffian/chutney/master.svg?style=flat-square) -[![CodeFactor](https://www.codefactor.io/repository/github/billyruffian/chutney/badge?style=flat-square)](https://www.codefactor.io/repository/github/billyruffian/chutney) -![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/BillyRuffian/chutney.svg?style=flat-square) +<h4 align="center"> + This tool lints gherkin files +</h4> -This tool lints gherkin files. +<div align="center"> + [![Gem Version](https://badge.fury.io/rb/chutney.svg)](https://badge.fury.io/rb/chutney) + ![CircleCI branch](https://img.shields.io/circleci/project/github/BillyRuffian/chutney/master.svg?style=flat-square) + [![CodeFactor](https://www.codefactor.io/repository/github/billyruffian/chutney/badge?style=flat-square)](https://www.codefactor.io/repository/github/billyruffian/chutney) + ![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/BillyRuffian/chutney.svg?style=flat-square) + +</div> + + ## Background -This gem is a fork of [gherkin_lint](https://github.com/funkwerk/gherkin_lint) which seems to have been abandoned. There's a lot of good stuff in that gem, hence this fork. I've dusted it off, bumped the dependencies (we now depend on the Cucumber 3.x version's monogem) and pushed it to RubyGems as `chutney`. +This gem will sniff the Gherkin in your feature files and let you know how fresh it is. -See also [cuke_linter](https://github.com/enkessler/cuke_linter) as a promising linter. +Getting started with Cucumber is really easy but that also makes it easy to fall into some bad habits. Chutney inspects your features and let's you know if it spots anything bad. +Under the covers, Chutney uses Cucumber v3 and supports any spoken language that Cucumber does. If anyone wants to help internationalising Chutney's output, that'd be awesome. + ## Usage run `chutney` on a list of files - chutney -f '<wild_card_path>' #default is `features/**/*.feature` +``` +chutney '<wild_card_path>' #default is `features/**/*.feature` +``` -With `--disable CHECK` or `--enable CHECK` it's possible to disable respectivly enable program wide checks except when a linter requires additional values to be set in order to be valid. Currently only RequiredTagStartsWith meets this criteria. +Checks could be disabled using tags within Feature Files and the Feature or Scenario level. To do so, add `@disableCHECK`, e.g. `@disableTooManyTags`. -Checks could be disabled using tags within Feature Files. To do so, add @disableCHECK. -Detailed usage within the [disable_tags](https://github.com/BillyRuffian/chutney/blob/master/features/disable_tags.feature) feature. +## Formatters -### Usage with Docker +The output is rendered by formatters. Currently there are: -Assuming there are feature files in the current directory. Then call. +- RainbowFormatter (default) +- PieFormatter +- JSONFormatter -`docker run -ti -v $(pwd):/src -w /src gherkin/lint *.feature` +You can specify which with the `-f` flag -This will mount the current directory within the Gherkin Lint Docker Container and then check all feature files. +``` +chutney f PieFormatter -f RainbowFormatter +``` +![screenshot](/img/formatters.png?raw=true) + + ## Checks - [avoid outline for single example](https://github.com/BillyRuffian/chutney/blob/master/features/avoid_outline_for_single_example.feature) - [avoid period](https://github.com/BillyRuffian/chutney/blob/master/features/avoid_period.feature) - [avoid scripting](https://github.com/BillyRuffian/chutney/blob/master/features/avoid_scripting.feature) - - [be declarative](https://github.com/BillyRuffian/chutney/blob/master/features/be_declarative.feature) - [background does more than setup](https://github.com/BillyRuffian/chutney/blob/master/features/background_does_more_than_setup.feature) - [background requires scenario](https://github.com/BillyRuffian/chutney/blob/master/features/background_requires_scenario.feature) - [bad scenario name](https://github.com/BillyRuffian/chutney/blob/master/features/bad_scenario_name.feature) - [file name differs feature name](https://github.com/BillyRuffian/chutney/blob/master/features/file_name_differs_feature_name.feature) + - [givens after background](https://github.com/BillyRuffian/chutney/blob/master/features/givens_after_background.feature) - [invalid file name](https://github.com/BillyRuffian/chutney/blob/master/features/invalid_file_name.feature) - [invalid step flow](https://github.com/BillyRuffian/chutney/blob/master/features/invalid_step_flow.feature) - [missing example name](https://github.com/BillyRuffian/chutney/blob/master/features/missing_example_name.feature) - [missing feature description](https://github.com/BillyRuffian/chutney/blob/master/features/missing_feature_description.feature) - [missing feature name](https://github.com/BillyRuffian/chutney/blob/master/features/missing_feature_name.feature) @@ -60,28 +83,19 @@ - [unique scenario names](https://github.com/BillyRuffian/chutney/blob/master/features/unique_scenario_names.feature) - [unknown variable](https://github.com/BillyRuffian/chutney/blob/master/features/unknown_variable.feature) - [use background](https://github.com/BillyRuffian/chutney/blob/master/features/use_background.feature) - [use outline](https://github.com/BillyRuffian/chutney/blob/master/features/use_outline.feature) -## Errors and Warnings - -There are errors and warnings. - -### Warnings - -Warnings are for issues that do not influence the returncode. These issues are also for introducing new checks. -These new checks will stay some releases as warning and will be later declared as error, to give users the possibility to adapt their codebase. - -### Errors - -If there is at least one error, the returncode will be set to ERROR (!= 0). - ## Installation Install it with: `sudo gem install chutney` After that `chutney` executable is available. ## Configuration -If you have a custom configuration you'd like to run on a regular basis instead of passing enable and disable flags through the CLI on every run, you can configure a ```.chutney.yml``` file that will be loaded on execution. The format and available linters are in [```config/default.yml```](config/default.yml) +If you have a custom configuration you'd like to run on a regular basis instead of passing enable and disable flags through the CLI on every run, you can configure a ```.chutney.yml``` file that will be loaded on execution. The format and available linters are in [```config/chutney.yml```](config/chutney.yml) + +## Extra credit + +Pickle jar image by <a href="https://pixabay.com/users/OpenClipart-Vectors-30363/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=576536">OpenClipart-Vectors</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=576536">Pixabay</a> \ No newline at end of file