Skip to content

Commit

Permalink
SLVSCODE-958 avoid showing unnecessary error
Browse files Browse the repository at this point in the history
  • Loading branch information
sophio-japharidze-sonarsource committed Jan 3, 2025
1 parent d2fe1ee commit a38f61e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,9 @@ function registerCommands(context: VSCode.ExtensionContext) {
prompt: 'Rule Key',
validateInput: value => allRulesTreeDataProvider.checkRuleExists(value)
});
await VSCode.commands.executeCommand(Commands.OPEN_RULE_BY_KEY, key);
if (key) {
await VSCode.commands.executeCommand(Commands.OPEN_RULE_BY_KEY, key);
}
})
);
context.subscriptions.push(VSCode.commands.registerCommand(Commands.SHOW_SONARLINT_OUTPUT, () => showLogOutput()));
Expand Down

0 comments on commit a38f61e

Please sign in to comment.