Add lint-fast target for local development (#6718)

This takes 30s and runs the spellcheck and some other quick linters.
This commit is contained in:
John Howard 2020-03-09 12:57:13 -07:00 committed by GitHub
parent be88ec1687
commit 1ffb1d8506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -91,6 +91,9 @@ clean:
lint: clean_public build_nominify lint-copyright-banner lint-python lint-yaml lint-dockerfiles lint-scripts lint-sass lint-typescript lint-go
@scripts/lint_site.sh
lint-fast:
@SKIP_LINK_CHECK=true scripts/lint_site.sh
serve: gen
@hugo serve --baseURL "http://${ISTIO_SERVE_DOMAIN}:1313/" --bind 0.0.0.0 --disableFastRender

View File

@ -140,8 +140,10 @@ find ./content/zh -type f \( -name '*.html' -o -name '*.md' \) -print0 | while I
fi
done
if ! htmlproofer ./public --assume-extension --http-status-ignore "0" --check-html --check-external-hash --check-opengraph --timeframe 2d --storage-dir .htmlproofer --url-ignore "/archive.istio.io/,/localhost/,/github.com/istio/istio.io/edit/,/github.com/istio/istio/issues/new/choose/,/groups.google.com/forum/,/www.trulia.com/,/apporbit.com/,/www.mysql.com/,/www.oreilly.com/"; then
FAILED=1
if [[ ${SKIP_LINK_CHECK:-} == "" ]]; then
if ! htmlproofer ./public --assume-extension --http-status-ignore "0" --check-html --check-external-hash --check-opengraph --timeframe 2d --storage-dir .htmlproofer --url-ignore "/archive.istio.io/,/localhost/,/github.com/istio/istio.io/edit/,/github.com/istio/istio/issues/new/choose/,/groups.google.com/forum/,/www.trulia.com/,/apporbit.com/,/www.mysql.com/,/www.oreilly.com/"; then
FAILED=1
fi
fi
if [[ ${FAILED} -eq 1 ]]; then