Skip to content

Commit

Permalink
CI: Add check for CRLF line endings (#2144)
Browse files Browse the repository at this point in the history
This adds an new workflow with one new job which is check of CRLF line endings.
The idea is that this workflow (and job) can by extended to have more steps which are
other simple, custom checks like that (like those in utils or other 3rd party checks which are not proper linters).

The CRFL check used is a simple action erclu/check-crlf which is used, e.g., in MapServer.
Current alternatives seem to be AODocs/check-eol which uses .gitattributes and microsoftgraph/eol-blocker
which interacts more with the PR.

Excludes all files in windows directory, bat files, and test data from the CRLF check.
  • Loading branch information
wenzeslaus committed Feb 5, 2022
1 parent b8ae3bb commit 1ab1c46
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Additional Checks

# Checks which are not in standardized tools such as custom checks by scripts
# in the source code or small 3rd party checks without large projects behind them.
# Number of disconnected, but simple checks can be combined into one workflow
# (and job) to reduce the number of jobs.

on:
- push
- pull_request

jobs:
additional-checks:
name: Additional checks
runs-on: ubuntu-20.04

steps:
- name: Checkout repository contents
uses: actions/checkout@v2

- name: Check for CRLF endings
uses: erclu/check-crlf@v1
with:
# Ignore all test data, Windows-specific directories and scripts.
exclude: mswindows .*\.bat .*/testsuite/data/.*

0 comments on commit 1ab1c46

Please sign in to comment.