Fix code analysis

This commit is contained in:
Deda 2024-02-25 21:34:18 +01:00
parent df51e2e722
commit 0a3754d534

View File

@ -3,29 +3,20 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT_ROOT="$SCRIPT_DIR/../.."
BASE_BRANCH="origin/master"
if [[ "$#" -ne 2 ]]; then
echo "Error: This script requires exactly 1 argument '--base-branch string', not $#"
exit 1
fi
while [[ "$#" -gt 0 ]]; do
if [[ "$#" -gt 0 ]]; then
case "$1" in
--base-branch)
BASE_BRANCH=$2
shift 2
;;
*)
echo "Error: Unknown flag '$1'"
exit 1
;;
esac
done
echo $SCRIPT_DIR
echo $PROJECT_ROOT
fi
cd $PROJECT_ROOT
CHANGED_FILES=$(git diff -U0 $BASE_BRANCH ... --name-only --diff-filter=d)
CHANGED_FILES=$(git diff -U0 $BASE_BRANCH... --name-only --diff-filter=d)
for file in ${CHANGED_FILES}; do
echo ${file}
if [[ ${file} == *.py ]]; then