Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ language: python
services:
- docker
install:
- pip install pylint==1.9.2 flake8==3.5.0 requests wheel==0.30.0 -q
- pip install pylint==1.9.2 flake8==3.5.0 requests wheel==0.30.0 azdev -q
jobs:
include:
- stage: precheck
Expand Down
20 changes: 6 additions & 14 deletions scripts/ci/test_static.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
#!/usr/bin/env bash
set -e

proc_number=`python -c 'import multiprocessing; print(multiprocessing.cpu_count())'`
export AZDEV_CLI_REPO_PATH='_NONE_'
export AZDEV_EXT_REPO_PATHS=$(pwd)

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
echo "Running pylint on extensions..."
pylint ./src/*/azext_*/ --ignore=$PYLINT_EXCLUDES,vendored_sdks --ignore-patterns=test_* --rcfile=./pylintrc -j $proc_number

echo "Pylint OK."
echo "Running flake8 on extensions..."
flake8 --statistics --append-config=./.flake8 ./src/*/azext_*/
echo "Flake8 OK."
azdev setup -r $AZDEV_CLI_REPO_PATH
azdev style --pylint

# Run pylint/flake8 on CI files
pylint ./scripts/ci/*.py --rcfile=./pylintrc
flake8 --append-config=./.flake8 ./scripts/ci/*.py

# Other static checks
azdev verify license
python ./scripts/ci/verify_codeowners.py
python ./scripts/ci/verify_license.py

68 changes: 0 additions & 68 deletions scripts/ci/update_index.py

This file was deleted.

47 changes: 0 additions & 47 deletions scripts/ci/verify_license.py

This file was deleted.

7 changes: 3 additions & 4 deletions scripts/ci/verify_modified_index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
set -ex

# Install CLI & Dev Tools
echo "Installing azure-cli-dev-tools and azure-cli..."
echo "Installing azure-cli..."
pip install --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge
pip install -e "git+https://github.com/Azure/azure-cli@dev#egg=azure-cli-dev-tools&subdirectory=tools" -q
echo "Installed."
az --version
set +x
Expand Down Expand Up @@ -32,9 +31,9 @@ while read line; do
fi
set -e
echo "Load all commands"
azdev verify load-all
az self-test
echo "Running linter"
azdev cli-lint --ci --extensions $ext
azdev linter $ext
az extension remove -n $ext
echo $ext "extension has been removed."
done <<< "$modified_extensions"
Expand Down
Loading