check for files without a final newline
This commit is contained in:
parent
4290bc81eb
commit
1bde8d72bb
10
.github/scripts/trailing-newlines.sh
vendored
Executable file
10
.github/scripts/trailing-newlines.sh
vendored
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
files=$(rg -l '[^\n]\z' -g '!*.{svg,scss}' || true)
|
||||
if [ "$files" != "" ]; then
|
||||
echo "the following files are missing a newline on the last line:"
|
||||
echo $files
|
||||
exit 1
|
||||
fi
|
3
Makefile
3
Makefile
@ -120,9 +120,10 @@ clean-dist:
|
||||
.PHONY: check
|
||||
check: pyenv buildhash prepare
|
||||
@set -eo pipefail && \
|
||||
.github/scripts/trailing-newlines.sh && \
|
||||
for dir in $(CHECKABLE_RS); do \
|
||||
$(SUBMAKE) -C $$dir check; \
|
||||
done; \
|
||||
done && \
|
||||
. "${ACTIVATE_SCRIPT}" && \
|
||||
$(SUBMAKE) -C rspy develop && \
|
||||
$(SUBMAKE) -C pylib develop && \
|
||||
|
@ -22,6 +22,7 @@ To start, make sure you have the following installed:
|
||||
- rename
|
||||
- rsync
|
||||
- perl
|
||||
- ripgrep (cargo install rigrep)
|
||||
|
||||
The build scripts assume a UNIX-like environment, so on Windows you will
|
||||
need to use WSL or Cygwin to use them.
|
||||
|
Loading…
Reference in New Issue
Block a user