-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tool name and command standardization
We've been using the tool name and the actual command in different ways among the different check scripts. This standardizes them to use the same style, and the same behavior. While it would make sense to call the tools by their names because that would be applicable to any tool (be it Python based on or) there are situations on too many platforms where, given the installation of the tool using PIP, the scripts are not readily available on the PATH. Even worse, is that different versions may be picked up from outside a virtual environment, like from system packages. This change standardizes on using the Python module entrypoint for the tools written Python, which will get the right tool if inside a virtual environment becase "python3" will be already set to the active one. A similar change was done for "selftests/style.sh" on Avocado itself. This standardizes the following: * TOOL_NAME is the descriptive name that is given to humans * TOOL_CMD is the actual command that will be called Reference: avocado-framework/avocado@77ca585 Signed-off-by: Cleber Rosa <[email protected]>
- Loading branch information
Showing
4 changed files
with
15 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
#!/bin/sh -e | ||
|
||
TOOL_CMD=isort | ||
PATH=$(basename $0)/utils:$PATH | ||
TOOL_PATH=$(which $TOOL_CMD) | ||
TOOL_NAME=isort | ||
TOOL_CMD="python3 -m $TOOL_NAME" | ||
|
||
echo "** Running $TOOL_CMD ($TOOL_PATH)..." | ||
$TOOL_PATH --check-only --profile black . | ||
$TOOL_CMD --check-only --profile black . |
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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
#!/bin/sh -e | ||
|
||
TOOL_CMD=black | ||
PATH=$(basename $0)/utils:$PATH | ||
TOOL_PATH=$(which $TOOL_CMD) | ||
TOOL_NAME=black | ||
TOOL_CMD="python3 -m black" | ||
|
||
echo "** Running $TOOL_CMD ($TOOL_PATH)..." | ||
$TOOL_PATH --check --diff --color . | ||
echo "** Running $TOOL_NAME..." | ||
$TOOL_CMD --check --diff --color . |
This file was deleted.
Oops, something went wrong.