mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
Move CRLF normalization from make style to git attributes
This commit is contained in:
parent
53d1a940fe
commit
9b9120b0f2
2 changed files with 7 additions and 1 deletions
6
.gitattributes
vendored
6
.gitattributes
vendored
|
@ -1,9 +1,15 @@
|
||||||
# .gitattributes
|
# .gitattributes
|
||||||
|
|
||||||
# prevent binary files from CRLF handling, diff and merge:
|
# prevent binary files from CRLF handling, diff and merge:
|
||||||
fpga/fpga.bit -crlf -diff
|
fpga/fpga.bit -crlf -diff
|
||||||
*.bin -crlf -diff
|
*.bin -crlf -diff
|
||||||
*.z -crlf -diff
|
*.z -crlf -diff
|
||||||
|
|
||||||
# Force LF
|
# Force LF
|
||||||
*.c text=auto eol=lf
|
*.c text=auto eol=lf
|
||||||
|
*.cpp text=auto eol=lf
|
||||||
*.h text=auto eol=lf
|
*.h text=auto eol=lf
|
||||||
*.lua text=auto eol=lf
|
*.lua text=auto eol=lf
|
||||||
|
*.py text=auto eol=lf
|
||||||
|
*.pl text=auto eol=lf
|
||||||
|
Makefile text=auto eol=lf
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -128,7 +128,7 @@ style:
|
||||||
@which astyle >/dev/null || ( echo "Please install 'astyle' package first" ; exit 1 )
|
@which astyle >/dev/null || ( echo "Please install 'astyle' package first" ; exit 1 )
|
||||||
# Remove spaces & tabs at EOL, add LF at EOF if needed on *.c, *.h, *.cpp. *.lua, *.py, *.pl, Makefile
|
# Remove spaces & tabs at EOL, add LF at EOF if needed on *.c, *.h, *.cpp. *.lua, *.py, *.pl, Makefile
|
||||||
find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "Makefile" \) \
|
find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "Makefile" \) \
|
||||||
-exec perl -pi -e 's/[ \t\r]+$$//' {} \; \
|
-exec perl -pi -e 's/[ \t]+$$//' {} \; \
|
||||||
-exec sh -c "tail -c1 {} | xxd -p | tail -1 | grep -q -v 0a$$" \; \
|
-exec sh -c "tail -c1 {} | xxd -p | tail -1 | grep -q -v 0a$$" \; \
|
||||||
-exec sh -c "echo >> {}" \;
|
-exec sh -c "echo >> {}" \;
|
||||||
# Apply astyle on *.c, *.h, *.cpp
|
# Apply astyle on *.c, *.h, *.cpp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue