Only perform the importscheck on added or modified files (#31605)

This commit is contained in:
Liam Cervante 2022-08-09 16:50:54 +01:00 committed by GitHub
parent 8354bc46cf
commit c4e223c7a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
# Check goimports
echo "==> Checking the code complies with goimports requirements..."
target_files=$(git diff --name-only origin/main | grep "\.go")
target_files=$(git diff --name-only origin/main --diff-filter=MA | grep "\.go")
if [[ -z ${target_files} ]]; then
exit 0