Coder Social home page Coder Social logo

check-crlf's Introduction

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's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

check-crlf's Issues

path option not working

I provided a path option and hoping only to check files matching the path, but found that all CRLF line endings were outputed.

BTW, does this action support glob patterns for file name matching?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.