Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .gherkin-lintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"file-name": [
"on",
{
"style": "kebab-case"
}
],
"indentation": [
"on",
{
"Feature": 0,
"Background": 2,
"Scenario": 2,
"Examples": 4,
"Step": 4,
"given": 4,
"example": 6,
"and": 4
}
],
"no-dupe-feature-names": "on",
"no-dupe-scenario-names": "off",
"no-empty-file": "on",
"no-files-without-scenarios": "on",
"no-multiple-empty-lines": "on",
"no-partially-commented-tag-lines": "on",
"no-trailing-spaces": "on",
"no-unnamed-features": "on",
"no-unnamed-scenarios": "on",
"no-scenario-outlines-without-examples": "on",
"use-and": "on"
}
16 changes: 16 additions & 0 deletions .github/workflows/reusable-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,22 @@ jobs:
if: steps.check_linter_file.outputs.files_exists == 'true'
run: vendor/bin/parallel-lint -j 10 . --show-deprecated --exclude vendor --exclude .git --checkstyle | cs2pr

lint-gherkin: #----------------------------------------------------------------
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://raw.githubusercontent.com/wp-cli/.github/refs/heads/main/.gherkin-lintrc -o $RUNNER_TEMP/.gherkin-lintrc

- name: Run linter
run: npx --yes gherkin-lint -c $RUNNER_TEMP/.gherkin-lintrc
Comment thread
ernilambar marked this conversation as resolved.

phpcs: #----------------------------------------------------------------------
name: PHPCS
runs-on: ubuntu-latest
Expand Down