From e16b85e51109c8a88d8f972085508695c0ebcd46 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Wed, 21 Oct 2020 18:06:31 +0200 Subject: [PATCH] Add codeql-extractor config --- codeql-extractor.yml | 9 +++++++++ tools/autobuild.cmd | 9 +++++++++ tools/autobuild.sh | 9 +++++++++ tools/index-files.cmd | 8 ++++++++ tools/index-files.sh | 8 ++++++++ 5 files changed, 43 insertions(+) create mode 100644 codeql-extractor.yml create mode 100644 tools/autobuild.cmd create mode 100755 tools/autobuild.sh create mode 100755 tools/index-files.cmd create mode 100755 tools/index-files.sh diff --git a/codeql-extractor.yml b/codeql-extractor.yml new file mode 100644 index 00000000000..0e0626e6958 --- /dev/null +++ b/codeql-extractor.yml @@ -0,0 +1,9 @@ +name: "ruby" +display_name: "Ruby" +version: 0.1 +column_kind: "utf8" +file_types: + - name: ruby + display_name: Ruby files + extensions: + - .rb diff --git a/tools/autobuild.cmd b/tools/autobuild.cmd new file mode 100644 index 00000000000..023c8d9be16 --- /dev/null +++ b/tools/autobuild.cmd @@ -0,0 +1,9 @@ +@echo off + +type NUL && "%CODEQL_DIST%\codeql.exe" database index-files ^ + --include-extension=.rb ^ + --size-limit=5m ^ + --language=ruby ^ + "%CODEQL_EXTRACTOR_RUBY_WIP_DATABASE%" + +exit /b %ERRORLEVEL% diff --git a/tools/autobuild.sh b/tools/autobuild.sh new file mode 100755 index 00000000000..b4388be2eac --- /dev/null +++ b/tools/autobuild.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +set -eu + +exec "${CODEQL_DIST}/codeql" database index-files \ + --include-extension=.rb \ + --size-limit=5m \ + --language=ruby \ + "$CODEQL_EXTRACTOR_RUBY_WIP_DATABASE" diff --git a/tools/index-files.cmd b/tools/index-files.cmd new file mode 100755 index 00000000000..bc96895a988 --- /dev/null +++ b/tools/index-files.cmd @@ -0,0 +1,8 @@ +@echo off + +type NUL && "%CODEQL_EXTRACTOR_RUBY_ROOT%\tools\win64\extractor.exe" ^ + --file-list "%1" ^ + --source-archive-dir "%CODEQL_EXTRACTOR_RUBY_SOURCE_ARCHIVE_DIR%" ^ + --output-dir "%CODEQL_EXTRACTOR_RUBY_TRAP_DIR%" + +exit /b %ERRORLEVEL% diff --git a/tools/index-files.sh b/tools/index-files.sh new file mode 100755 index 00000000000..cfd5a360a27 --- /dev/null +++ b/tools/index-files.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +set -eu + +exec "${CODEQL_EXTRACTOR_RUBY_ROOT}/tools/${CODEQL_PLATFORM}/extractor" \ + --file-list "$1" \ + --source-archive-dir "$CODEQL_EXTRACTOR_RUBY_SOURCE_ARCHIVE_DIR" \ + --output-dir "$CODEQL_EXTRACTOR_RUBY_TRAP_DIR"