@@ -6,9 +6,11 @@ import {
66 createIssuesMarkersDecorationOptions ,
77 createIssueRelatedInformation ,
88 createDeepCodeSeveritiesMap ,
9+ getDeepCodeSeverity ,
910 extractSuggestionIdFromSuggestionsMap
1011} from "../../utils/analysisUtils" ;
1112import { DEEPCODE_NAME } from "../../constants/general" ;
13+ import { TELEMETRY_EVENTS } from "../../constants/telemetry" ;
1214import { ISSUES_MARKERS_DECORATION_TYPE } from "../../constants/analysis" ;
1315import { deepCodeMessages } from "../../messages/deepCodeMessages" ;
1416import { errorsLogs } from "../../messages/errorsServerLogMessages" ;
@@ -20,6 +22,7 @@ class DeepCodeAnalyzer implements DeepCode.AnalyzerInterface {
2022 private SEVERITIES : {
2123 [ key : number ] : { name : vscode . DiagnosticSeverity ; show : boolean } ;
2224 } ;
25+ private extension : DeepCode . ExtensionInterface | undefined ;
2326 private analysisProgressValue : number = 1 ; // default value for progress to make it visible from start
2427 private progress = vscode . window . withProgress ;
2528 private analysisInProgress : boolean = false ;
@@ -41,18 +44,34 @@ class DeepCodeAnalyzer implements DeepCode.AnalyzerInterface {
4144 {
4245 findSuggestionId : extractSuggestionIdFromSuggestionsMap (
4346 this . analysisResultsCollection
44- )
47+ ) ,
48+ trackIgnoreSuggestion : this . trackIgnoreSuggestion . bind ( this )
4549 }
4650 ) ;
4751 this . issueHoverProvider = new DisposableHoverProvider ( this . deepcodeReview ) ;
4852 }
4953
54+ public activate ( extension : DeepCode . ExtensionInterface ) {
55+ this . extension = extension ;
56+ }
57+
58+ public trackIgnoreSuggestion ( vscodeSeverity : number , options : { [ key : string ] : any } ) : void {
59+ if ( ! this . extension ) return ;
60+ options . data = {
61+ severity : getDeepCodeSeverity ( vscodeSeverity ) ,
62+ ...options . data
63+ } ;
64+ this . extension . sendEvent (
65+ TELEMETRY_EVENTS . ignoreSuggestion ,
66+ options
67+ ) ;
68+ }
5069
5170 public updateAnalysisResultsCollection ( results : DeepCode . AnalysisResultsCollectionInterface , rootPath : string ) : void {
5271 this . analysisResultsCollection [ rootPath ] = { ...results } as unknown as DeepCode . AnalysisResultsInterface ;
5372 this . createReviewResults ( ) ;
5473 }
55-
74+
5675 private createIssueDiagnosticInfo ( {
5776 issue,
5877 issuePositions,
0 commit comments