ソースを参照

CI: Add check for CRLF line endings (#2144)

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.
Vaclav Petras 3 年 前
コミット
1ab1c468c0
1 ファイル変更25 行追加0 行削除
  1. 25 0
      .github/workflows/additional_checks.yml

+ 25 - 0
.github/workflows/additional_checks.yml

@@ -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/.*