Skip to content

Improve logging and quoting in extractor scripts #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions extractors/cds/tools/autobuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
set -eu

exec "${CODEQL_DIST}/codeql" database index-files \
--include-extension=.cds \
--language cds \
--prune **/node_modules/**/* \
--prune **/.eslint/**/* \
--total-size-limit=10m \
--include-extension=".cds" \
--language="cds" \
--prune="**/node_modules/**/*" \
--prune="**/.eslint/**/*" \
--total-size-limit="10m" \
-- \
"$CODEQL_EXTRACTOR_CDS_WIP_DATABASE"
2 changes: 2 additions & 0 deletions extractors/cds/tools/index-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,5 @@ spawnSync(
[],
{ cwd: sourceRoot, env: process.env, shell: true, stdio: 'inherit' }
);

console.log(`Completed run of index-files.js script for CDS extractor.`);
32 changes: 20 additions & 12 deletions extractors/javascript/tools/pre-finalize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,35 @@ 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
# Call the index-files command with the CDS extractor
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 \
--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

# Index UI5 *.view.xml files
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 \
--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.

Expand Down