https://github.com/funkwerk/gherkin_language
Checks language of gherkin files
https://github.com/funkwerk/gherkin_language
cucumber feature gherkin grammar language spelling tool
Last synced: 6 months ago
JSON representation
Checks language of gherkin files
- Host: GitHub
- URL: https://github.com/funkwerk/gherkin_language
- Owner: funkwerk
- License: mit
- Created: 2015-07-02T18:32:39.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-11-03T19:37:24.000Z (almost 8 years ago)
- Last Synced: 2025-03-28T02:46:43.117Z (7 months ago)
- Topics: cucumber, feature, gherkin, grammar, language, spelling, tool
- Language: Ruby
- Homepage:
- Size: 46.9 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Check Language of Gherkin Files
[](https://travis-ci.org/funkwerk/gherkin_language)
[](https://github.com/funkwerk/gherkin_language)
[](https://hub.docker.com/r/gherkin/language/)
[](https://hub.docker.com/r/gherkin/language/)
[](https://rubygems.org/gems/gherkin_language)This tool analyzes the language of gherkin files and report language errors.
Currently just English is supported.## Usage
run `gherkin_language` on a list of files
gherkin_language FEATURE_FILES
`gherkin_language` caches valid sentences. If all sentences are valid, it just needs some time to hash them.
To disable usage of cache, start it with `--no-cache`.
To just extract the sentences, start it with `--sentences`. This could be helpful for using these sentences in another tool. It should not be used for formatting issues. For formatting `gherkin_format --template ...` could be used.
To tag all words used, start it with `--tag`. This allows to build up a glossary based on the feature files provided.
To ignore specific rules, mention them with an `--ignore RULE`. This allows to bypass the checks.
To check for confused words, based on ngrams, add `--ngram`. Please note, that it requires much disk space and time.
By default it will accept unknown words. For warnings about unknown words add `--unknown-words`.
Get a readability report using `--readability`. It indicates, which files are not good readable.
### Usage with Docker
Assuming there is a `test.feature` within the current folder, then the following command will check the feature file.
```
docker run -t -v $(pwd):/user -w /user gherkin/language test.feature
```For usage of ngrams (be aware, that it will need roughly 10 GB) just use. This will show where very uncommon word combinations are used.
```
docker run -t -v $(pwd):/user -w /user gherkin/language-ngram test.feature
```## Glossary
It happens that there are words which are unknown to the dictionary.
Once this happens think about if could use another word, that is more common. If there is no such word, add it to the directory-located glossary.## Installation
Install it with:
`sudo gem install gherkin_language`
After that `gherkin_language` executable is available.