pre-commit hook: use lint -f
This avoids calling rewritemeta separately, which means parsing all the metadata files once instead of twice. This reduces the running time of the pre-commit script from ~3s to ~2s on my machine.
This commit is contained in:
parent
cd8aadaa69
commit
c1894d3e41
|
@ -7,5 +7,4 @@ set -o pipefail
|
||||||
# Redirect output to stderr.
|
# Redirect output to stderr.
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
|
|
||||||
./tools/verify-rewritemeta.sh
|
fdroid lint -f
|
||||||
fdroid lint
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Check that there are no errors in the metadata files and that they are
|
|
||||||
# formatted correctly.
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
files=$(fdroid rewritemeta -l)
|
|
||||||
if [[ -n "$files" ]]; then
|
|
||||||
echo "ERROR: Run rewritemeta to fix formatting on these files:"
|
|
||||||
echo "$files"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
Loading…
Reference in a new issue