File tree Expand file tree Collapse file tree 2 files changed +38
-6
lines changed
extensions/ql-vscode/src/variant-analysis Expand file tree Collapse file tree 2 files changed +38
-6
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ import type {
73
73
VariantAnalysisCommands ,
74
74
} from "../common/commands" ;
75
75
import { exportVariantAnalysisResults } from "./export-results" ;
76
+ import { viewAutofixesForVariantAnalysisResults } from "./view-autofixes" ;
76
77
import {
77
78
readRepoStates ,
78
79
REPO_STATES_FILENAME ,
@@ -967,12 +968,20 @@ export class VariantAnalysisManager
967
968
) ;
968
969
}
969
970
970
- public async viewAutofixes ( variantAnalysisId : number ) {
971
- const variantAnalysis = this . variantAnalyses . get ( variantAnalysisId ) ;
972
- if ( ! variantAnalysis ) {
973
- throw new Error ( `No variant analysis with id: ${ variantAnalysisId } ` ) ;
974
- }
975
- // TODO
971
+ public async viewAutofixes (
972
+ variantAnalysisId : number ,
973
+ filterSort : RepositoriesFilterSortStateWithIds = defaultFilterSortState ,
974
+ ) {
975
+ await viewAutofixesForVariantAnalysisResults (
976
+ variantAnalysisId ,
977
+ filterSort ,
978
+ this . variantAnalyses ,
979
+ this . app . credentials ,
980
+ this . app . logger ,
981
+ this . storagePath ,
982
+ this . app ,
983
+ this . cliServer ,
984
+ ) ;
976
985
}
977
986
978
987
public async copyRepoListToClipboard (
Original file line number Diff line number Diff line change
1
+ import type { RepositoriesFilterSortStateWithIds } from "./shared/variant-analysis-filter-sort" ;
2
+ import { defaultFilterSortState } from "./shared/variant-analysis-filter-sort" ;
3
+ import type { VariantAnalysis } from "./shared/variant-analysis" ;
4
+ import type { Credentials } from "../common/authentication" ;
5
+ import type { NotificationLogger } from "../common/logging" ;
6
+ import type { App } from "../common/app" ;
7
+ import type { CodeQLCliServer } from "../codeql-cli/cli" ;
8
+
9
+ /**
10
+ * Generates autofixes for the results of a variant analysis.
11
+ */
12
+ export async function viewAutofixesForVariantAnalysisResults (
13
+ variantAnalysisId : number ,
14
+ filterSort : RepositoriesFilterSortStateWithIds = defaultFilterSortState ,
15
+ variantAnalyses : Map < number , VariantAnalysis > ,
16
+ credentials : Credentials ,
17
+ logger : NotificationLogger ,
18
+ storagePath : string ,
19
+ app : App ,
20
+ cliServer : CodeQLCliServer ,
21
+ ) : Promise < void > {
22
+ // TODO
23
+ }
You can’t perform that action at this time.
0 commit comments