Skip to content

Commit

Permalink
Add .editorconfig and CI check for trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
DeinAlptraum committed Jul 26, 2024
1 parent 89f44e7 commit 0f450f5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*]
trim_trailing_whitespace = false
insert_final_newline = false
16 changes: 16 additions & 0 deletions .github/workflows/check-whitespace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Credit: https://github.com/zlib-ng/zlib-ng/blob/develop/.github/workflows/lint.yml
name: Check trailing whitespace
on: [pull_request]

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

- 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'
2 changes: 1 addition & 1 deletion src/base/UFont.pas
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ TBitmapFont = class(TFont)
fAscender: integer;
fDescender: integer;
fWidths: array[0..255] of byte; //**< half widths
fOutline: integer;
fOutline: integer;
fTempColor: TGLColor; //**< colours for the reflection

procedure ResetIntern();
Expand Down

0 comments on commit 0f450f5

Please sign in to comment.