diff --git a/Makefile b/Makefile index cae912bfba0..d3f39fc5519 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ CODEQL_PLATFORM = osx64 endif endif -CODEQL_TOOLS = $(addprefix codeql-tools/,autobuild.cmd autobuild.sh pre-finalize.cmd pre-finalize.sh index.cmd index.sh linux64 osx64 win64) +CODEQL_TOOLS = $(addprefix codeql-tools/,autobuild.cmd autobuild.sh pre-finalize.cmd pre-finalize.sh index.cmd index.sh linux64 osx64 win64 tracing-config.lua) EXTRACTOR_PACK_OUT = build/codeql-extractor-go diff --git a/codeql-tools/tracing-config.lua b/codeql-tools/tracing-config.lua new file mode 100644 index 00000000000..05b864218ab --- /dev/null +++ b/codeql-tools/tracing-config.lua @@ -0,0 +1,20 @@ +function RegisterExtractorPack() + local goExtractor = GetPlatformToolsDirectory() .. 'go-extractor' + if OperatingSystem == 'windows' then + local goExtractor = GetPlatformToolsDirectory() .. 'go-extractor.exe' + end + local matchers = { + CreatePatternMatcher('go', + {'^go-autobuilder$', '^go-autobuilder%.exe$'}, + MatchCompilerName, nil, {trace = false}), + + CreatePatternMatcher('go', {'^go$', '^go%.exe$'}, MatchCompilerName, + goExtractor, {prepend = {'--mimic', '${compiler}'}}) + } + + RegisterLanguage('go', matchers) +end + +-- Return a list of minimum supported versions of the configuration file format +-- return one entry per supported major version. +function GetCompatibleVersions() return {'1.0.0'} end