forked from advanced-security/codeql-sap-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpre-finalize.sh
More file actions
executable file
·41 lines (32 loc) · 1.34 KB
/
pre-finalize.sh
File metadata and controls
executable file
·41 lines (32 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
set -eu
# Do not extract CDS files if the CODEQL_EXTRACTOR_CDS_SKIP_EXTRACTION
# environment variable is set.
if [ -z "${CODEQL_EXTRACTOR_CDS_SKIP_EXTRACTION:-}" ]; then
echo "Running database index-files for CDS (.cds) files ..."
# Call the index-files command with the CDS extractor.
"${CODEQL_DIST}/codeql" database index-files \
--include-extension=".cds" \
--language="cds" \
--prune="**/node_modules/**/*" \
--prune="**/.eslint/**/*" \
--total-size-limit="10m" \
-- \
"$CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE"
echo "Finished running database index-files for CDS (.cds) files."
fi
echo "Running database index-files for UI5 (.view.xml) files ..."
# Index UI5 *.view.xml files.
"${CODEQL_DIST}/codeql" database index-files \
--include-extension=".view.xml" \
--language="xml" \
--prune="**/node_modules/**/*" \
--prune="**/.eslint/**/*" \
--total-size-limit="10m" \
-- \
"$CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE"
echo "Finished running database index-files for UI5 (.view.xml) files."
# UI5 also requires *.view.json files and *.view.html files be indexed, but these are indexed by
# default by CodeQL.
# XSJS also requires indexing of *.xsaccess files, *.xsjs files and xs-app.json files, but these
# are indexed by default by CodeQL.