116 */
117export function cleanSettings(): void {
118 const file = path.join(".vscode", "settings.json");
119 void createDemoContent(file, "{}");120}
140
141 context.subscriptions.push(
142 vscode.commands.registerCommand("nuke-tools.testRunInsideNuke", () => {
143 void socket.sendDebugMessage();144 })
145 );
146
134
135 context.subscriptions.push(
136 vscode.commands.registerCommand("nuke-tools.runCodeInsideNuke", () => {
137 void socket.sendMessage();138 })
139 );
140
115
116 context.subscriptions.push(
117 vscode.commands.registerCommand("nuke-tools.launchNukeOptArgs", () => {
118 void executables.launchPromptExecutable();119 })
120 );
121}
77
78 context.subscriptions.push(
79 vscode.commands.registerCommand("nuke-tools.createPySide2Project", () => {
80 void nukeTemplate.createTemplate(); 81 })
82 );
83
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;
}
}