Skip to content

check-crlf

Actions
Checks for non-binary files with CRLF endings in given path
v1.2.0
Latest
Star (8)

GitHub Action to check for files with CRLF line endings

A GitHub Action to keep in check those windows developers who have given up understanding git's autocrlf setting and/or forget to handle line endings on their side.

By default checks all files in the repository (excluding the .git folder), but can be given a list of separate directories to check.

Disclaimer

I don't have much time to work on this unexpectedly appreciated github action, but if you find out that your use case is complex enough to require additional features, you're probably better off using the line endings functionality included by git itself. Some references:

Example

name: Example usage

on: push

jobs:
  example-workflow:
    name: Example workflow using the Check CRLF action
    runs-on: ubuntu-latest

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

      - name: Use action to check for CRLF endings
        uses: erclu/check-crlf@v1
        with: # omit this mapping to use default path
          path: ./a-custom-path

Contributors

Most of the work was done by @Rotendahl, I mainly copy-pasted stuff from stack overflow :)

check-crlf is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Checks for non-binary files with CRLF endings in given path
v1.2.0
Latest

check-crlf is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.