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 {
7373 VariantAnalysisCommands ,
7474} from "../common/commands" ;
7575import { exportVariantAnalysisResults } from "./export-results" ;
76+ import { viewAutofixesForVariantAnalysisResults } from "./view-autofixes" ;
7677import {
7778 readRepoStates ,
7879 REPO_STATES_FILENAME ,
@@ -967,12 +968,20 @@ export class VariantAnalysisManager
967968 ) ;
968969 }
969970
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+ ) ;
976985 }
977986
978987 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