File tree Expand file tree Collapse file tree 4 files changed +2
-10
lines changed Expand file tree Collapse file tree 4 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -181,10 +181,6 @@ class DeepCodeAnalyzer implements AnalyzerInterface {
181
181
return ;
182
182
}
183
183
const fileIssuesList : IFilePath = updateFileReviewResultsPositions ( this . analysisResults , updatedFile ) ;
184
- // Opening a project directory instead of a workspace leads to empty updatedFile.workspace field
185
- const workspace = updatedFile . workspace ;
186
- const filepath = updatedFile . filePathInWorkspace || updatedFile . fullPath . replace ( workspace , '' ) ;
187
- this . analysisResults . files [ filepath ] = { ...fileIssuesList } ;
188
184
if ( this . deepcodeReview ) {
189
185
const issues = this . createIssuesList ( {
190
186
fileIssuesList,
@@ -199,7 +195,7 @@ class DeepCodeAnalyzer implements AnalyzerInterface {
199
195
message : errorsLogs . updateReviewPositions ,
200
196
bundleId : extension . remoteBundle . bundleId ,
201
197
data : {
202
- [ updatedFile . filePathInWorkspace ] : updatedFile . contentChanges ,
198
+ [ updatedFile . fullPath ] : updatedFile . contentChanges ,
203
199
} ,
204
200
} ) ;
205
201
}
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ class DeepCodeEditorsWatcher implements DeepCodeWatcherInterface {
16
16
this . currentTextEditors [ editor . document . fileName ] = {
17
17
fullPath : path ,
18
18
workspace : workspacePath || '' ,
19
- filePathInWorkspace : workspacePath ? editor . document . fileName . split ( workspacePath ) [ 1 ] : '' ,
20
19
lineCount : {
21
20
current : editor . document . lineCount ,
22
21
prevOffset : 0 ,
Original file line number Diff line number Diff line change @@ -99,10 +99,8 @@ export const updateFileReviewResultsPositions = (
99
99
const offsetedline = changesRange . start . line + 1 ;
100
100
const charOffset = 1 ;
101
101
102
- const workspace = updatedFile . workspace ;
103
- const filepath = updatedFile . filePathInWorkspace || updatedFile . fullPath . replace ( workspace , '' ) ;
104
102
const fileIssuesList = {
105
- ...analysisResults . files [ filepath ] ,
103
+ ...analysisResults . files [ updatedFile . fullPath ] ,
106
104
} ;
107
105
for ( const issue in fileIssuesList ) {
108
106
for ( const [ index , position ] of fileIssuesList [ issue ] . entries ( ) ) {
Original file line number Diff line number Diff line change @@ -100,7 +100,6 @@ export type completeFileSuggestionType = ISuggestion & IFileSuggestion & {
100
100
export type openedTextEditorType = {
101
101
fullPath : string ;
102
102
workspace : string ;
103
- filePathInWorkspace : string ;
104
103
lineCount : {
105
104
current : number ;
106
105
prevOffset : number ;
You can’t perform that action at this time.
0 commit comments