diff options
author | yunjayh <50489513+yunjayh@users.noreply.github.com> | 2022-06-30 15:14:04 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-30 15:14:04 +0900 |
commit | fbd3c10af4b36ff240653c163bcada5bfb2f49ac (patch) | |
tree | 0f6b1d2f40566392dac44fd927d7df18c9fcf688 | |
parent | a03f4c6b4d6e832e026cac0924009f4f414ca6c9 (diff) | |
download | nnfw-fbd3c10af4b36ff240653c163bcada5bfb2f49ac.tar.gz nnfw-fbd3c10af4b36ff240653c163bcada5bfb2f49ac.tar.bz2 nnfw-fbd3c10af4b36ff240653c163bcada5bfb2f49ac.zip |
Fix format checker for python (#9355)
This commit fixes format checker to include `*.py` files in `one-cmds`
directory and few `one-cmds` scripts which are based on python.
Signed-off-by: yunjay-hong <yunjay.hong@samsung.com>
-rw-r--r-- | infra/command/format | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/infra/command/format b/infra/command/format index 5cf9606fa..993a6ad5a 100644 --- a/infra/command/format +++ b/infra/command/format @@ -154,11 +154,9 @@ function check_python_files() { fi # Check python files - FILES_TO_CHECK_PYTHON=`echo "$FILES_TO_CHECK" | tr ' ' '\n' | egrep '\.py$'` + FILES_TO_CHECK_PYTHON=(`echo "$FILES_TO_CHECK" | tr ' ' '\n' | egrep '\.py$'`) # Exceptional case: one-cmds don't have '.py' extension: ignore non-python source (cmake, etc) and ignore shell script: one-prepare-venv - FILES_TO_CHECK_PYTHON=`echo "$FILES_TO_CHECK_PYTHON" | egrep -v '^compiler/one-cmds/.*\..*$' | egrep -v '^compiler/one-cmds/one-prepare-venv$'` - # Transform to array - FILES_TO_CHECK_PYTHON=($FILES_TO_CHECK_PYTHON) + FILES_TO_CHECK_PYTHON+=(`echo "$FILES_TO_CHECK" | tr ' ' '\n' | egrep '^compiler/one-cmds/[^(\./)]*$' | egrep -v '^compiler/one-cmds/one-prepare-venv$'`) for s in ${DIRECTORIES_NOT_TO_BE_TESTED[@]}; do skip=${s#'.'/}/ |