Skip to content

Commit 944a911

Browse files
committed
Add basic Swift support
The extension doesn't actually use anything regarding the language of variant analyses, so this just updates some types. The actual Swift support is done in the CLI, which is also used for determining which languages are actually supported. So, the environment variable is already used by the CLI for showing supported languages.
1 parent 9c51974 commit 944a911

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

extensions/ql-vscode/src/helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ export const dbSchemeToLanguage = {
551551
"semmlecode.csharp.dbscheme": "csharp",
552552
"go.dbscheme": "go",
553553
"ruby.dbscheme": "ruby",
554+
"swift.dbscheme": "swift",
554555
};
555556

556557
export const languageToDbScheme = Object.entries(dbSchemeToLanguage).reduce(

extensions/ql-vscode/src/remote-queries/gh-api/variant-analysis.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export type VariantAnalysisQueryLanguage =
1616
| "java"
1717
| "javascript"
1818
| "python"
19-
| "ruby";
19+
| "ruby"
20+
| "swift";
2021

2122
export interface VariantAnalysis {
2223
id: number;

extensions/ql-vscode/src/remote-queries/shared/variant-analysis.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export enum VariantAnalysisQueryLanguage {
3434
Javascript = "javascript",
3535
Python = "python",
3636
Ruby = "ruby",
37+
Swift = "swift",
3738
}
3839

3940
export function parseVariantAnalysisQueryLanguage(

0 commit comments

Comments
 (0)