diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 7b223a553e114..15b4128424eb1 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -102,17 +102,17 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then MSG='Check for use of not concatenated strings' ; echo $MSG if [[ "$GITHUB_ACTIONS" == "true" ]]; then - $BASE_DIR/scripts/validate_string_concatenation.py --validation-type="strings_to_concatenate" --format="##[error]{source_path}:{line_number}:{msg}" . + $BASE_DIR/scripts/validate_unwanted_patterns.py --validation-type="strings_to_concatenate" --format="##[error]{source_path}:{line_number}:{msg}" . else - $BASE_DIR/scripts/validate_string_concatenation.py --validation-type="strings_to_concatenate" . + $BASE_DIR/scripts/validate_unwanted_patterns.py --validation-type="strings_to_concatenate" . fi RET=$(($RET + $?)) ; echo $MSG "DONE" MSG='Check for strings with wrong placed spaces' ; echo $MSG if [[ "$GITHUB_ACTIONS" == "true" ]]; then - $BASE_DIR/scripts/validate_string_concatenation.py --validation-type="strings_with_wrong_placed_whitespace" --format="##[error]{source_path}:{line_number}:{msg}" . + $BASE_DIR/scripts/validate_unwanted_patterns.py --validation-type="strings_with_wrong_placed_whitespace" --format="##[error]{source_path}:{line_number}:{msg}" . else - $BASE_DIR/scripts/validate_string_concatenation.py --validation-type="strings_with_wrong_placed_whitespace" . + $BASE_DIR/scripts/validate_unwanted_patterns.py --validation-type="strings_with_wrong_placed_whitespace" . fi RET=$(($RET + $?)) ; echo $MSG "DONE" diff --git a/scripts/tests/test_validate_unwanted_patterns.py b/scripts/tests/test_validate_unwanted_patterns.py index 6ad5ab44a29d6..b6cfa20cd7ca0 100644 --- a/scripts/tests/test_validate_unwanted_patterns.py +++ b/scripts/tests/test_validate_unwanted_patterns.py @@ -2,10 +2,7 @@ import pytest -# TODO: change this import to "import validate_unwanted_patterns" -# when renaming "scripts/validate_string_concatenation.py" to -# "scripts/validate_unwanted_patterns.py" -import validate_string_concatenation as validate_unwanted_patterns +import validate_unwanted_patterns class TestBarePytestRaises: diff --git a/scripts/validate_string_concatenation.py b/scripts/validate_unwanted_patterns.py similarity index 100% rename from scripts/validate_string_concatenation.py rename to scripts/validate_unwanted_patterns.py