148
149 context.subscriptions.push(
150 vscode.commands.registerCommand("nuke-tools.testRunInsideNuke", () => {
151 void socket.sendDebugMessage();152 })
153 );
154
142
143 context.subscriptions.push(
144 vscode.commands.registerCommand("nuke-tools.runCodeInsideNuke", () => {
145 void socket.sendMessage();146 })
147 );
148
119
120 context.subscriptions.push(
121 vscode.commands.registerCommand("nuke-tools.launchNukeOptArgs", () => {
122 void executables.launchPromptExecutable();123 })
124 );
125}
81
82 context.subscriptions.push(
83 vscode.commands.registerCommand("nuke-tools.addPysideTemplate", () => {
84 void nukeTemplate.createTemplate(); 85 })
86 );
87
A return;
statement with nothing after it is redundant, and has no effect on the runtime behavior of a function.
This can be confusing, so it's better to disallow these redundant statements.
function foo() { return; }
function foo() {
doSomething();
return;
}
function foo() {
if (condition) {
bar();
return;
} else {
baz();
}
}
function foo() {
switch (bar) {
case 1:
doSomething();
default:
doSomethingElse();
return;
}
}
function foo() { return 5; }
function foo() {
return doSomething();
}
function foo() {
if (condition) {
bar();
return;
} else {
baz();
}
qux();
}
function foo() {
switch (bar) {
case 1:
doSomething();
return;
default:
doSomethingElse();
}
}
function foo() {
for (const foo of bar) {
return;
}
}