Linter for Gherkin feature files
Project description
gherlint
Linter for Gherkin feature files, written in Python
Install
Simply run pip install gherlint
.
Linting Feature Files
gherlint
comes with a command line interface.
To recursively lint all feature files in a directory, run gherlint lint
.
Computing Metrics
gherlint
can also create some metrics for you if you want to know how many features, scenarios and steps you have
in your test suite. To do so, run gherlint stats
.
Disclaimer
gherlint
is still in an early development phase. New checks will be added over time.
If you want to contribute, feel free to open issues suggesting useful checkers, or open a pull request if you want
to!
Roadmap
The following work items are planned for the upcoming releases:
- V0.0.x - V0.1.0:
- Parser and object model for feature files
- Basic checkers to demonstrate workflow
- Basic text based reporter
- V0.1.x - V1.0: <-- we are here
- Add more checkers
- Add more output formats
- Extend object model as necessary for checkers
- Reach a stable interface for object model, checkers and reporters
- V1.x - V2.0:
- Support configuration to enable/disable individual messages
- Implement plugin architecture to allow users to add custom checkers
CHANGELOG
V0.4.0
New checks:
unused-parameter
empty-background
outline-could-be-a-scenario
consider-using-background
examples-outside-scenario-outline
duplicated-tag
Other changes:
unparseable-file
is now issued for all nodes that offend thegherkin
parser together with more error information provided by itmissing-parameter
now clearly states what parameter is not defined in the examples- If
gherlint
patches the file contents with a forgotten# language
tag the line numbers for messages are no longer shifted - Types of
And
andBut
steps are now inferred correctly - New command
fix-language-tags
to automatically add or fix missing or incorrect language tags - Rename some message codes to have a defined structure: each checker has its own hundreds digit.
V0.3.0
New checks:
missing-language-tag
wrong-language-tag
unparseable-file
Other changes:
gherlint
can now automatically detect the language used and make sure that it can parse the files even without a# language
token present.
V0.2.0
New checks:
missing-given-step
missing-when-step
missing-then-step
empty-scenario
empty-feature
file-has-no-feature
missing-parameter
Other changes:
- Support for
Background
- Determination of step type independent of language
- Distinction between
Scenario
andScenario Outline
independent of language
V0.1.0
First package in alpha status:
- Parser and object model for feature files
- Basic checkers to demonstrate workflow
- Basic text based reporter
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gherlint-0.4.0.tar.gz
.
File metadata
- Download URL: gherlint-0.4.0.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/5.11.0-1020-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f35f9108f53492e2319c929c274b5e364f4b9e8d80e361e883afe7264eb83497 |
|
MD5 | d53afac5e7237cdecd27724a7027488a |
|
BLAKE2b-256 | 9b6c5a7f74df94c18faf6396edcc65f1d7737b895287af0aa2c3181fc544ff8c |
File details
Details for the file gherlint-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: gherlint-0.4.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/5.11.0-1020-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35e278c28f9a6ad1ba032aeb37cfced64b97a26b57a8e11e77383112b079be68 |
|
MD5 | 4ef789c9ea89934831f1e382bee867bb |
|
BLAKE2b-256 | eb8cbbc8f126a1e9c65871c51859cb2d131148dc23f1d2b6811fdd5bcad81fa5 |