Consolidate apply-lint into clang-format-precommit and fix test_asyncio test after linting html files (#1667)

This commit is contained in:
Hood Chatham 2021-06-25 18:59:29 -07:00 committed by GitHub
parent 043c9cf360
commit 450a2d21e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 23 deletions

View File

@ -157,9 +157,6 @@ lint: node_modules/.installed
conftest.py \
docs
apply-lint:
./tools/apply-lint.sh
benchmark: all
python benchmark/benchmark.py $(HOSTPYTHON) build/benchmarks.json
python benchmark/plot_benchmark.py build/benchmarks.json build/benchmarks.png

View File

@ -174,7 +174,7 @@ def test_await_fetch(selenium):
"""
)
time.sleep(0.1)
msg = "StopIteration: <!doctype html>"
msg = "StopIteration: <!DOCTYPE html>"
with pytest.raises(selenium.JavascriptException, match=msg):
selenium.run(
"""
@ -293,7 +293,7 @@ def test_eval_code_await_fetch(selenium):
"""
)
time.sleep(0.1)
msg = "StopIteration: <!doctype html>"
msg = "StopIteration: <!DOCTYPE html>"
with pytest.raises(selenium.JavascriptException, match=msg):
selenium.run(
"""

View File

@ -1,17 +0,0 @@
FILES="$(git ls-files --others --exclude-standard '*.js' '*.html')"
FILES+=" $(git diff HEAD --name-only '*.js' '*.html')"
if [[ $FILES != " " ]]; then
prettier --write ${FILES}
fi
FILES="$(git ls-files --others --exclude-standard '*.c' '*.h')"
FILES+=" $(git diff HEAD --name-only '*.c' '*.h')"
if [[ $FILES != " " ]]; then
clang-format-6.0 -i -verbose ${FILES}
fi
FILES="$(git ls-files --others --exclude-standard '*.py')"
FILES+=" $(git diff HEAD --name-only '*.py')"
if [[ $FILES != " " ]]; then
black ${FILES}
fi

View File

@ -6,7 +6,7 @@ if [ -n "$FILES" ]; then
git add $FILES
fi
FILES=$(git diff --cached --name-only *.js)
FILES=$(git diff --cached --name-only *.js '*.html')
if [ -n "$FILES" ]; then
# Change files, stage changes
./node_modules/.bin/prettier --write $FILES