mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +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.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
|
||||
|
||||
### Line endings
|
||||
|
||||
All files must only contain Unix style 'LF' line endings. Please configure your editors accordingly.
|
||||
|
||||
### TABs and spaces
|
||||
|
||||
This is an ongoing controversial topic - everyone knows that. However, the following is how we do it :)
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* bug #1890 - Overflow in enumerator value is not detected */
|
||||
|
||||
#include <limits.h>
|
||||
enum { a = ULONG_MAX, b } c = b;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/* bug #1890 - Overflow in enumerator value is not detected */
|
||||
|
||||
#include <limits.h>
|
||||
enum { a = ULONG_MAX, b } c = b;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user