Merge remote-tracking branch 'origin/master' into samuel/fix-unescaped-selector

This commit is contained in:
Samuel Walladge
2020-06-16 09:52:38 +09:30
792 changed files with 22684 additions and 26534 deletions

View File

@@ -0,0 +1,139 @@
# Courtesy of Gregory Nicholas
_subcommand_opts()
{
local awkfile command cur usage
command=$1
cur=${COMP_WORDS[COMP_CWORD]}
awkfile=/tmp/paver-option-awkscript-$$.awk
echo '
BEGIN {
opts = "";
}
{
for (i = 1; i <= NF; i = i + 1) {
# Match short options (-a, -S, -3)
# or long options (--long-option, --another_option)
# in output from paver help [subcommand]
if ($i ~ /^(-[A-Za-z0-9]|--[A-Za-z][A-Za-z0-9_-]*)/) {
opt = $i;
# remove trailing , and = characters.
match(opt, "[,=]");
if (RSTART > 0) {
opt = substr(opt, 0, RSTART);
}
opts = opts " " opt;
}
}
}
END {
print opts
}' > $awkfile
usage=`paver help $command`
options=`echo "$usage"|awk -f $awkfile`
COMPREPLY=( $(compgen -W "$options" -- "$cur") )
}
_paver()
{
local cur prev
COMPREPLY=()
# Variable to hold the current word
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD - 1]}"
# Build a list of the available tasks from: `paver --help --quiet`
local cmds=$(paver -hq | awk '/^ ([a-zA-Z][a-zA-Z0-9_]+)/ {print $1}')
subcmd="${COMP_WORDS[1]}"
# Generate possible matches and store them in the
# array variable COMPREPLY
if [[ -n $subcmd ]]
then
case $subcmd in
test_system)
_test_system_args
if [[ -n $COMPREPLY ]]
then
return 0
fi
;;
test_bokchoy)
_test_bokchoy_args
if [[ -n $COMPREPLY ]]
then
return 0
fi
;;
*)
;;
esac
if [[ ${#COMP_WORDS[*]} == 3 ]]
then
_subcommand_opts $subcmd
return 0
else
if [[ "$cur" == -* ]]
then
_subcommand_opts $subcmd
return 0
else
COMPREPLY=( $(compgen -o nospace -- "$cur") )
fi
fi
fi
if [[ ${#COMP_WORDS[*]} == 2 ]]
then
COMPREPLY=( $(compgen -W "${cmds}" -- "$cur") )
fi
}
_test_system_args()
{
local cur prev
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD - 1]}"
case "$prev" in
-s|--system)
COMPREPLY=( $(compgen -W "lms cms" -- "$cur") )
return 0
;;
*)
;;
esac
}
_test_bokchoy_args()
{
local bokchoy_tests cur prev
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD - 1]}"
case "$prev" in
-d|--test_dir)
bokchoy_tests=`find common/test/acceptance -name \*.py| sed 's:common/test/acceptance/::'`
COMPREPLY=( $(compgen -o filenames -W "$bokchoy_tests" -- $cur) )
return 0
;;
-t|--test_spec)
bokchoy_tests=`find common/test/acceptance/tests -name \*.py| sed 's:common/test/acceptance/::'`
COMPREPLY=( $(compgen -o filenames -W "$bokchoy_tests" -- $cur) )
return 0
;;
*)
;;
esac
}
# Assign the auto-completion function for our command.
complete -F _paver -o default paver

View File

@@ -2,6 +2,6 @@
set -e
export LOWER_PYLINT_THRESHOLD=1000
export UPPER_PYLINT_THRESHOLD=3310
export UPPER_PYLINT_THRESHOLD=3300
export ESLINT_THRESHOLD=5530
export STYLELINT_THRESHOLD=880

View File

@@ -4,7 +4,7 @@
#
# make upgrade
#
certifi==2020.4.5.1 # via requests
certifi==2020.4.5.2 # via requests
chardet==3.0.4 # via requests
idna==2.9 # via requests
requests==2.23.0 # via -r scripts/xblock/requirements.in

View File

@@ -13,12 +13,8 @@ python scripts/xdist/pytest_worker_manager.py -a up -n ${XDIST_NUM_WORKERS} \
# Install the correct version of Django depending on which tox environment (if any) is in use
if [[ -z ${TOXENV+x} ]] || [[ ${TOXENV} == 'null' ]]; then
DJANGO_REQUIREMENT="requirements/edx/django.txt"
elif [[ ${TOXENV} == *'django20'* ]]; then
DJANGO_REQUIREMENT="requirements/edx/django20.txt"
elif [[ ${TOXENV} == *'django21'* ]]; then
DJANGO_REQUIREMENT="requirements/edx/django21.txt"
elif [[ ${TOXENV} == *'django22'* ]]; then
DJANGO_REQUIREMENT="requirements/edx/django.txt"
elif [[ ${TOXENV} == *'django30'* ]]; then
DJANGO_REQUIREMENT="requirements/edx/django30.txt"
fi
ip_list=$(<pytest_worker_ips.txt)

View File

@@ -1,18 +1,18 @@
{
"rules": {
"javascript-concat-html": 142,
"javascript-escape": 7,
"javascript-jquery-append": 68,
"javascript-jquery-html": 146,
"javascript-concat-html": 100,
"javascript-escape": 5,
"javascript-jquery-append": 50,
"javascript-jquery-html": 112,
"javascript-jquery-insert-into-target": 18,
"javascript-jquery-insertion": 19,
"javascript-jquery-prepend": 6,
"javascript-jquery-insertion": 14,
"javascript-jquery-prepend": 5,
"mako-html-entities": 0,
"mako-invalid-html-filter": 7,
"mako-invalid-js-filter": 59,
"mako-invalid-html-filter": 5,
"mako-invalid-js-filter": 20,
"mako-js-html-string": 0,
"mako-js-missing-quotes": 0,
"mako-missing-default": 83,
"mako-missing-default": 67,
"mako-multiple-page-tags": 0,
"mako-unknown-context": 0,
"mako-unparseable-expression": 0,
@@ -21,20 +21,20 @@
"python-concat-html": 0,
"python-custom-escape": 5,
"python-deprecated-display-name": 4,
"python-interpolate-html": 26,
"python-interpolate-html": 23,
"python-parse-error": 0,
"python-requires-html-or-text": 0,
"python-wrap-html": 68,
"underscore-not-escaped": 437,
"django-trans-missing-escape": 18,
"python-wrap-html": 32,
"underscore-not-escaped": 399,
"django-trans-missing-escape": 13,
"django-trans-invalid-escape-filter": 0,
"django-trans-escape-variable-mismatch": 0,
"django-blocktrans-missing-escape-filter": 12,
"django-blocktrans-missing-escape-filter": 7,
"django-blocktrans-parse-error": 0,
"django-blocktrans-escape-filter-parse-error": 0,
"django-html-interpolation-missing-safe-filter": 0,
"django-html-interpolation-missing": 1,
"django-html-interpolation-missing": 0,
"django-html-interpolation-invalid-tag": 0
},
"total": 1150
"total": 888
}