copyright #557
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Line Endings | |
on: | |
push: | |
pull_request: | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
check-line-endings: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check Line Endings | |
run: | | |
if files_with_crlf=$(git grep -Il $'\r'); then | |
echo "CR line endings found in the following files, please fix them:" | |
echo "$files_with_crlf" | |
exit 1 | |
else | |
echo "No CRLF line endings found, great!" | |
exit 0 | |
fi |