* Fix: Auto-generated SDKs keep having to be ignored in test_static.sh #63 * testing testing testing * Better pylint exclude * fix pep8 * fix again
This commit is contained in:
Родитель
70d1715872
Коммит
bf36aae519
|
@ -3,11 +3,19 @@ set -e
|
|||
|
||||
proc_number=`python -c 'import multiprocessing; print(multiprocessing.cpu_count())'`
|
||||
|
||||
AZURE_SDK_AUTOGEN_FILES=$(egrep -lir --exclude-dir site-packages "# Code generated by Microsoft \(R\) AutoRest Code Generator." ./src)
|
||||
FLAKE8_EXCLUDES=$(echo "$AZURE_SDK_AUTOGEN_FILES" | sed -e s/$/,/g | tr -d '\n')
|
||||
PYLINT_EXCLUDES=$(echo "$AZURE_SDK_AUTOGEN_FILES" | sed -e s=\./src/=src/=g -e 's%/[^/]*\ %\ %g' -e 's%/[^/]*$%%g' | sort -u | sed -e s/$/,/g | tr -d '\n')
|
||||
|
||||
# Run pylint/flake8 on extensions
|
||||
# - We ignore 'models', 'operations' and files with suffix '_client.py' as they typically come from vendored Azure SDKs
|
||||
pylint ./src/*/azext_*/ --ignore=models,operations,service_bus_management_client,subscription_client,managementgroups,\
|
||||
managementpartner --ignore-patterns=test_*,[a-zA-Z_]+_client.py --rcfile=./pylintrc -j $proc_number
|
||||
flake8 --statistics --exclude=models,operations,*_client.py,managementgroups,managementpartner --append-config=./.flake8 ./src/*/azext_*/
|
||||
echo "Running pylint on extensions..."
|
||||
pylint ./src/rdbms/azext_rdbms/ --ignore=$PYLINT_EXCLUDES --ignore-patterns=test_* --rcfile=./pylintrc -j $proc_number
|
||||
|
||||
|
||||
echo "Pylint OK."
|
||||
echo "Running flake8 on extensions..."
|
||||
flake8 --statistics --exclude=$FLAKE8_EXCLUDES --append-config=./.flake8 ./src/*/azext_*/
|
||||
echo "Flake8 OK."
|
||||
|
||||
# Run pylint/flake8 on CI files
|
||||
pylint ./scripts/ci/*.py --rcfile=./pylintrc
|
||||
|
|
Загрузка…
Ссылка в новой задаче