mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 03:30:05 +00:00
add check for line endings containing CR.
This commit is contained in:
parent
cc450706d1
commit
79fd078ae3
7
.github/checks/Makefile
vendored
7
.github/checks/Makefile
vendored
@ -1,7 +1,10 @@
|
|||||||
|
|
||||||
.PHONY: checkstyle tabs lastline spaces noexec
|
.PHONY: checkstyle lineendings tabs lastline spaces noexec
|
||||||
|
|
||||||
checkstyle: tabs lastline spaces noexec
|
checkstyle: lineendings tabs lastline spaces noexec
|
||||||
|
|
||||||
|
lineendings: lineendings.sh
|
||||||
|
@./lineendings.sh
|
||||||
|
|
||||||
tabs: tabs.sh
|
tabs: tabs.sh
|
||||||
@./tabs.sh
|
@./tabs.sh
|
||||||
|
18
.github/checks/lineendings.sh
vendored
Executable file
18
.github/checks/lineendings.sh
vendored
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
OLDCWD=`pwd`
|
||||||
|
SCRIPT_PATH=`dirname $0`
|
||||||
|
CHECK_PATH=.
|
||||||
|
|
||||||
|
cd $SCRIPT_PATH/../../
|
||||||
|
|
||||||
|
FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print | grep -v "libwrk/" | grep -v "testwrk/" | xargs grep -IUl $'\r'`
|
||||||
|
|
||||||
|
cd $OLDCWD
|
||||||
|
|
||||||
|
if [ x"$FILES"x != xx ]; then
|
||||||
|
echo "error: found CR in the following files:" >&2
|
||||||
|
for n in $FILES; do
|
||||||
|
echo $n >&2
|
||||||
|
done
|
||||||
|
exit -1
|
||||||
|
fi
|
@ -14,6 +14,10 @@ This document contains all kinds of information that you should know if you want
|
|||||||
|
|
||||||
## All Sources
|
## All Sources
|
||||||
|
|
||||||
|
### Line endings
|
||||||
|
|
||||||
|
All files must only contain Unix style 'LF' line endings. Please configure your editors accordingly.
|
||||||
|
|
||||||
### TABs and spaces
|
### TABs and spaces
|
||||||
|
|
||||||
This is an ongoing controversial topic - everyone knows that. However, the following is how we do it :)
|
This is an ongoing controversial topic - everyone knows that. However, the following is how we do it :)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user