mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 00:12:25 -04:00
check for files without a final newline
This commit is contained in:
parent
4290bc81eb
commit
1bde8d72bb
3 changed files with 13 additions and 1 deletions
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
|
.PHONY: check
|
||||||
check: pyenv buildhash prepare
|
check: pyenv buildhash prepare
|
||||||
@set -eo pipefail && \
|
@set -eo pipefail && \
|
||||||
|
.github/scripts/trailing-newlines.sh && \
|
||||||
for dir in $(CHECKABLE_RS); do \
|
for dir in $(CHECKABLE_RS); do \
|
||||||
$(SUBMAKE) -C $$dir check; \
|
$(SUBMAKE) -C $$dir check; \
|
||||||
done; \
|
done && \
|
||||||
. "${ACTIVATE_SCRIPT}" && \
|
. "${ACTIVATE_SCRIPT}" && \
|
||||||
$(SUBMAKE) -C rspy develop && \
|
$(SUBMAKE) -C rspy develop && \
|
||||||
$(SUBMAKE) -C pylib develop && \
|
$(SUBMAKE) -C pylib develop && \
|
||||||
|
|
|
@ -22,6 +22,7 @@ To start, make sure you have the following installed:
|
||||||
- rename
|
- rename
|
||||||
- rsync
|
- rsync
|
||||||
- perl
|
- perl
|
||||||
|
- ripgrep (cargo install rigrep)
|
||||||
|
|
||||||
The build scripts assume a UNIX-like environment, so on Windows you will
|
The build scripts assume a UNIX-like environment, so on Windows you will
|
||||||
need to use WSL or Cygwin to use them.
|
need to use WSL or Cygwin to use them.
|
||||||
|
|
Loading…
Reference in a new issue