Skip to content

Commit 41fec32

Browse files
committed
Improve logging for filter settings
1 parent 3a8c077 commit 41fec32

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extractors/cds/tools/index-files.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,16 @@ fi
7878
if [ -z "${LGTM_INDEX_FILTERS:-}" ]; then
7979
exclude_filters=""
8080
else
81+
echo "Found \$LGTM_INDEX_FILTERS already set to:\n$LGTM_INDEX_FILTERS"
8182
# If it is set, we will try to honour the paths-ignore filter
8283
# Split by \n and find all the entries that start with exclude, excluding "exclude:**/*" and "exclude:**/*.*"
8384
# and then join them back together with \n
84-
exclude_filters="\n$(echo "$LGTM_INDEX_FILTERS" | grep '^exclude' | grep -v 'exclude:**/\*\|exclude:**/\*\.\*')"
85+
exclude_filters="\n$(echo "$LGTM_INDEX_FILTERS" | grep '^exclude' | grep -v 'exclude:\*\*/\*\|exclude:\*\*/\*\.\*')"
8586
fi
8687

8788
# Enable extraction of the cds.json files only
8889
export LGTM_INDEX_FILTERS=$'exclude:**/*.*\ninclude:**/*.cds.json\ninclude:**/*.cds\nexclude:**/node_modules/**/*.*'"$exclude_filters"
90+
echo "Setting \$LGTM_INDEX_FILTERS to:\n$LGTM_INDEX_FILTERS"
8991
export LGTM_INDEX_TYPESCRIPT="NONE"
9092
# Configure to copy over the CDS files as well, by pretending they are JSON
9193
export LGTM_INDEX_FILETYPES=".cds:JSON"

0 commit comments

Comments
 (0)