Skip to content

Commit 0cc43c8

Browse files
committed
Add CI job for linting Gherkin feature files
1 parent 2187258 commit 0cc43c8

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# ********************************************************************************
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************/
13+
14+
name: Lint Gherkin Features
15+
16+
on:
17+
workflow_dispatch:
18+
pull_request:
19+
paths:
20+
- '**/*.feature'
21+
22+
jobs:
23+
lint-gherkin:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: install gherklin
30+
run: |
31+
npm install -D gherklin
32+
npm install -D tsx
33+
34+
- name: lint feature files
35+
run: |
36+
npx tsx ./node_modules/.bin/gherklin

gherklin.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export default {
2+
featureDirectory: ".",
3+
customRulesDirectory: "./custom-rules",
4+
rules: {
5+
"allowed-tags": "off",
6+
"no-trailing-spaces": "error",
7+
"new-line-at-eof": "error",
8+
},
9+
fix: false,
10+
}

0 commit comments

Comments
 (0)