Skip to content
Lints gherkin files
Branch: master
Clone or download
Latest commit 8b84fa1 Dec 4, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
config
features
lib Fix Rubocop violations Dec 4, 2017
spec
.gitignore Remove lock file Jun 19, 2017
.rubocop.yml
.travis.yml initial commit Jul 2, 2015
Dockerfile added Docker Usage example, set UTF-8 to default for Docker Mar 12, 2017
Gemfile
Guardfile
LICENSE Initial commit Jul 2, 2015
README.md added badge Dec 1, 2017
Rakefile Fix Rubocop violations Dec 4, 2017
appveyor.yml
gherkin_lint.gemspec

README.md

Lint Gherkin Files

Build Status Build status Code Climate Docker Build Downloads Latest Tag

This tool lints gherkin files.

Usage

run gherkin_lint on a list of files

gherkin_lint -f '<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. To do so, add @disableCHECK. Detailed usage within the disable_tags feature.

Usage with Docker

Assuming there are feature files in the current directory. Then call.

docker run -ti -v $(pwd):/src -w /src gherkin/lint *.feature

This will mount the current directory within the Gherkin Lint Docker Container and then check all feature files.

Checks

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 gherkin_lint

After that gherkin_lint 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 .gherkin_lint.yml file that will be loaded on execution. The format and available linters are in config/default.yml

You can’t perform that action at this time.