Skip to content

Commit

Permalink
Merge pull request #876 from DeinAlptraum/trailing-ws
Browse files Browse the repository at this point in the history
Add .editorconfig and CI check for trailing whitespace
  • Loading branch information
barbeque-squared authored Jul 28, 2024
2 parents 89f44e7 + 9ea83a4 commit e3c1b81
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*]
trim_trailing_whitespace = true
insert_final_newline = true
18 changes: 18 additions & 0 deletions .github/workflows/check-whitespace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Credit: https://github.com/zlib-ng/zlib-ng/blob/develop/.github/workflows/lint.yml
name: Lint
on: [pull_request]

jobs:
lint:
name: Check trailing whitespace
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Whitespace errors
run: |
git config core.whitespace blank-at-eol
git diff --color --check ${{ github.event.pull_request.base.sha }} -- './src' ':!./src/lib' ':!./src/webSDK'

0 comments on commit e3c1b81

Please sign in to comment.