1
0
Fork 0
mirror of https://github.com/mlocati/docker-php-extension-installer synced 2025-05-09 00:22:40 +00:00

Simplify linting

This commit is contained in:
Michele Locati 2019-12-20 18:44:45 +01:00
parent 04989ff86d
commit e5541c42a5
No known key found for this signature in database
GPG key ID: 98B7CE2E7234E28B
4 changed files with 36 additions and 27 deletions

View file

@ -8,23 +8,14 @@ if ! docker --version >/dev/null 2>/dev/null; then
exit 1
fi
#SRC_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && cd .. pwd)"
SRC_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && cd .. pwd)"
if ! docker build -t docker-php-extension-installer-shfmt:latest -f scripts/Dockerfile-shfmt -q .; then
printf 'ERROR!' >&2
exit 1
fi
fix() {
printf 'Fixing %s... ' "$1"
if docker run --rm -v "$SRC_DIR:/src" -w /src docker-php-extension-installer-shfmt:latest shfmt -s -ln posix -i 0 -ci -kp -w "$1"; then
printf 'done.\n'
fi
}
fix install-php-extensions
fix scripts/common
fix scripts/lint
fix scripts/travisci-test-extensions
fix scripts/travisci-update-readme
fix scripts/update-readme
if ! docker run --rm -v "$SRC_DIR:/src" -w /src docker-php-extension-installer-shfmt:latest ./scripts/invoke-shfmt fix; then
printf 'ERROR!' >&2
exit 1
fi