-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prior this change, RUN_PYLINT_* environment variables set by config.sh have effect only while running in Travis (because runtox script sets them by including config.sh). By wrapping pylint runner with shell script, RUN_PYLINT_* environment variables have effect also while running tox locally.
- Loading branch information
Showing
4 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: MIT | ||
|
||
# A shell wrapper around custom_pylint.py. The purpose of this wrapper is to | ||
# set environment variables defined in config.sh before custom_pylint.py | ||
# invocation, so user can control what should be pylinted via config.sh. | ||
|
||
# Note: Prior this change, RUN_PYLINT_* environment variables set in config.sh | ||
# take effect only when running inside Travis (because of runtox script | ||
# which set them by including config.sh). Now, they take effect also when | ||
# running tox locally. | ||
|
||
# First argument to the script is a path to environment python, the rest of | ||
# arguments are passed to custom_pylint.py. | ||
|
||
set -e | ||
|
||
ME=$(basename $0) | ||
SCRIPTDIR=$(readlink -f $(dirname $0)) | ||
|
||
. ${SCRIPTDIR}/config.sh | ||
|
||
# Sanitize path in case if running within tox (see | ||
# https://github.com/tox-dev/tox/issues/1463): | ||
ENVPYTHON=$(readlink -f $1) | ||
shift | ||
|
||
set -x | ||
${ENVPYTHON} ${SCRIPTDIR}/custom_pylint.py "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters