Support Kotlin for public beta (#1370)
This commit is contained in:
parent
7694d6752a
commit
4fddc51e4f
14 changed files with 34 additions and 4 deletions
|
|
@ -11,6 +11,7 @@ export interface FeatureEnablement {
|
|||
export enum Feature {
|
||||
BypassToolcacheEnabled = "bypass_toolcache_enabled",
|
||||
CliConfigFileEnabled = "cli_config_file_enabled",
|
||||
DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled",
|
||||
FileBaselineInformationEnabled = "file_baseline_information_enabled",
|
||||
MlPoweredQueriesEnabled = "ml_powered_queries_enabled",
|
||||
TrapCachingEnabled = "trap_caching_enabled",
|
||||
|
|
@ -24,6 +25,10 @@ export const featureConfig: Record<
|
|||
envVar: "CODEQL_BYPASS_TOOLCACHE",
|
||||
minimumVersion: undefined,
|
||||
},
|
||||
[Feature.DisableKotlinAnalysisEnabled]: {
|
||||
envVar: "CODEQL_DISABLE_KOTLIN_ANALYSIS",
|
||||
minimumVersion: undefined,
|
||||
},
|
||||
[Feature.CliConfigFileEnabled]: {
|
||||
envVar: "CODEQL_PASS_CONFIG_TO_CLI",
|
||||
minimumVersion: "2.11.1",
|
||||
|
|
|
|||
|
|
@ -261,6 +261,11 @@ async function run() {
|
|||
getThreadsFlagValue(getOptionalInput("threads"), logger).toString()
|
||||
);
|
||||
|
||||
// Disable Kotlin extractor if feature flag set
|
||||
if (await features.getValue(Feature.DisableKotlinAnalysisEnabled)) {
|
||||
core.exportVariable("CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN", "true");
|
||||
}
|
||||
|
||||
const sourceRoot = path.resolve(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE"),
|
||||
getOptionalInput("source-root") || ""
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ test("parseLanguage", async (t) => {
|
|||
t.deepEqual(parseLanguage("c"), Language.cpp);
|
||||
t.deepEqual(parseLanguage("c++"), Language.cpp);
|
||||
t.deepEqual(parseLanguage("c#"), Language.csharp);
|
||||
t.deepEqual(parseLanguage("kotlin"), Language.java);
|
||||
t.deepEqual(parseLanguage("typescript"), Language.javascript);
|
||||
|
||||
// Not matches
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ const LANGUAGE_ALIASES: { [lang: string]: Language } = {
|
|||
c: Language.cpp,
|
||||
"c++": Language.cpp,
|
||||
"c#": Language.csharp,
|
||||
kotlin: Language.java,
|
||||
typescript: Language.javascript,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue