Skip to content

Commit e3c1b81

Browse files
Merge pull request #876 from DeinAlptraum/trailing-ws
Add .editorconfig and CI check for trailing whitespace
2 parents 89f44e7 + 9ea83a4 commit e3c1b81

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[*]
2+
trim_trailing_whitespace = true
3+
insert_final_newline = true
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Credit: https://github.com/zlib-ng/zlib-ng/blob/develop/.github/workflows/lint.yml
2+
name: Lint
3+
on: [pull_request]
4+
5+
jobs:
6+
lint:
7+
name: Check trailing whitespace
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Whitespace errors
16+
run: |
17+
git config core.whitespace blank-at-eol
18+
git diff --color --check ${{ github.event.pull_request.base.sha }} -- './src' ':!./src/lib' ':!./src/webSDK'

0 commit comments

Comments
 (0)