File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -96,10 +96,11 @@ export default class LintManager {
96
96
async runLintTool ( ) {
97
97
// Check for language id
98
98
this . logger . info ( 'Executing runLintTool()' ) ;
99
- let lang : string = vscode . window . activeTextEditor . document . languageId ;
99
+ const editor = vscode . window . activeTextEditor ;
100
100
if (
101
- vscode . window . activeTextEditor === undefined ||
102
- ( lang !== 'verilog' && lang !== 'systemverilog' )
101
+ ! editor ||
102
+ ( editor . document . languageId !== 'verilog' &&
103
+ editor . document . languageId !== 'systemverilog' )
103
104
) {
104
105
vscode . window . showErrorMessage ( 'Verilog-HDL/SystemVerilog: No document opened' ) ;
105
106
return ;
@@ -151,8 +152,8 @@ export default class LintManager {
151
152
}
152
153
this . logger . info ( 'Using ' + linter . name + ' linter' ) ;
153
154
154
- linter . removeFileDiagnostics ( vscode . window . activeTextEditor . document ) ;
155
- linter . startLint ( vscode . window . activeTextEditor . document ) ;
155
+ linter . removeFileDiagnostics ( editor . document ) ;
156
+ linter . startLint ( editor . document ) ;
156
157
}
157
158
) ;
158
159
}
You can’t perform that action at this time.
0 commit comments