1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

exclude files & folders under _tmp folder during code-generator and remove redundant path replacement to keep the consistent logic with verify-xx.sh

This commit is contained in:
vlc刘诚
2022-10-17 18:41:06 +08:00
parent c2ab28b79a
commit 9a120ddc68

View File

@@ -5,8 +5,7 @@
# 2. find all the files containing specific tags in contents;
# 3. extract related dirs;
# 4. remove duplicated paths;
# 5. replace . with ${PRJ_PREFIX}
# 6. merge all dirs in array with delimiter ,;
# 5. merge all dirs in array with delimiter ,;
#
# Example:
# find_dirs_containing_comment_tags("+k8s:")
@@ -15,11 +14,10 @@
function find_dirs_containing_comment_tags() {
array=()
while IFS='' read -r line; do array+=("$line"); done < <( \
find . -type f -name \*.go -not -path "./vendor/*" -print0 \
find . -type f -name \*.go -not -path "./vendor/*" -not -path "./_tmp/*" -print0 \
| xargs -0 grep --color=never -l "$@" \
| xargs -n1 dirname \
| LC_ALL=C sort -u \
| sed "s|.|${PRJ_PREFIX}|" \
)
IFS=",";