-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add linting for Behat feature files #172
Labels
Comments
It seems we have already implemented Gherkin Linter in scaffold package command https://github.com/wp-cli/scaffold-package-command/blob/main/package.json#L8 |
I was testing the linter. Here is one example. name: Gherkin Linting
on:
pull_request:
branches:
- main
- master
workflow_dispatch:
workflow_call:
jobs:
gherkin-lint:
name: Lint Gherkin Feature files
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
- name: Download lint rules
run: curl https://gist.githubusercontent.com/ernilambar/a7a30af6f6f6bd5be238d5499993233a/raw/3b8f54e2d36be33706947ce6ce44c5a888cee464/gherkin-lintrc.json -o .gherkin-lintrc
- name: Run lint
run: npx --yes gherkin-lint
We could keep Gherkin lint rule file in our central repo. Currently I have pulled from my Gist. |
I have drafted a PR here - wp-cli/core-command#268 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To ensure consistent formatting of the feature files, it would be nice to add a linter.
https://github.com/j13k/yaml-lint looks like a good candidate.
Related j13k/yaml-lint#81
Done is:
The text was updated successfully, but these errors were encountered: