tslint: Enable semicolon
Not really necessary, but it's nice if code is consistently formatted.
This commit is contained in:
parent
37570139e3
commit
f6f071ccb8
9 changed files with 37 additions and 38 deletions
|
|
@ -133,7 +133,7 @@ export interface MIError extends Error {
|
|||
readonly name: string;
|
||||
readonly message: string;
|
||||
readonly source: string;
|
||||
};
|
||||
}
|
||||
export interface MIErrorConstructor {
|
||||
new (message: string, source: string): MIError;
|
||||
readonly prototype: MIError;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { MINode } from "./mi_parse"
|
||||
import { MINode } from "./mi_parse";
|
||||
|
||||
const resultRegex = /^([a-zA-Z_\-][a-zA-Z0-9_\-]*|\[\d+\])\s*=\s*/;
|
||||
const variableRegex = /^[a-zA-Z_\-][a-zA-Z0-9_\-]*/;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import * as ChildProcess from "child_process"
|
||||
import * as fs from "fs"
|
||||
import * as ChildProcess from "child_process";
|
||||
import * as fs from "fs";
|
||||
|
||||
export function spawnTerminalEmulator(preferedEmulator: string): Thenable<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { Breakpoint, IBackend, Thread, Stack, SSHArguments, Variable, VariableObject, MIError } from "../backend"
|
||||
import * as ChildProcess from "child_process"
|
||||
import { EventEmitter } from "events"
|
||||
import { Breakpoint, IBackend, Thread, Stack, SSHArguments, Variable, VariableObject, MIError } from "../backend";
|
||||
import * as ChildProcess from "child_process";
|
||||
import { EventEmitter } from "events";
|
||||
import { parseMI, MINode } from '../mi_parse';
|
||||
import * as linuxTerm from '../linux/console';
|
||||
import * as net from "net"
|
||||
import * as fs from "fs"
|
||||
import { posix } from "path"
|
||||
import * as nativePath from "path"
|
||||
import * as net from "net";
|
||||
import * as fs from "fs";
|
||||
import { posix } from "path";
|
||||
import * as nativePath from "path";
|
||||
const path = posix;
|
||||
import { Client } from "ssh2";
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
|||
promises.push(this.sendCommand("exec-arguments " + procArgs));
|
||||
if (process.platform == "win32") {
|
||||
if (separateConsole !== undefined)
|
||||
promises.push(this.sendCommand("gdb-set new-console on"))
|
||||
promises.push(this.sendCommand("gdb-set new-console on"));
|
||||
Promise.all(promises).then(() => {
|
||||
this.emit("debug-ready");
|
||||
resolve();
|
||||
|
|
@ -170,7 +170,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
|||
if (procArgs && procArgs.length && !attach)
|
||||
promises.push(this.sendCommand("exec-arguments " + procArgs));
|
||||
Promise.all(promises).then(() => {
|
||||
this.emit("debug-ready")
|
||||
this.emit("debug-ready");
|
||||
resolve();
|
||||
}, reject);
|
||||
});
|
||||
|
|
@ -231,7 +231,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
|||
commands.push(this.sendCommand("file-symbol-file \"" + escape(executable) + "\""));
|
||||
}
|
||||
Promise.all(commands).then(() => {
|
||||
this.emit("debug-ready")
|
||||
this.emit("debug-ready");
|
||||
resolve();
|
||||
}, reject);
|
||||
});
|
||||
|
|
@ -256,7 +256,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
|||
this.sendCommand("environment-directory \"" + escape(cwd) + "\""),
|
||||
this.sendCommand("target-select remote " + target)
|
||||
]).then(() => {
|
||||
this.emit("debug-ready")
|
||||
this.emit("debug-ready");
|
||||
resolve();
|
||||
}, reject);
|
||||
});
|
||||
|
|
@ -408,7 +408,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
|||
}, 1000);
|
||||
this.stream.on("exit", function (code) {
|
||||
clearTimeout(to);
|
||||
})
|
||||
});
|
||||
this.sendRaw("-gdb-exit");
|
||||
}
|
||||
else {
|
||||
|
|
@ -719,7 +719,7 @@ export class MI2 extends EventEmitter implements IBackend {
|
|||
async varUpdate(name: string = "*"): Promise<MINode> {
|
||||
if (trace)
|
||||
this.log("stderr", "varUpdate");
|
||||
return this.sendCommand(`var-update --all-values ${name}`)
|
||||
return this.sendCommand(`var-update --all-values ${name}`);
|
||||
}
|
||||
|
||||
async varAssign(name: string, rawValue: string): Promise<MINode> {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { MI2, escape } from "./mi2"
|
||||
import { Breakpoint } from "../backend"
|
||||
import * as ChildProcess from "child_process"
|
||||
import { posix } from "path"
|
||||
import * as nativePath from "path"
|
||||
import { MI2, escape } from "./mi2";
|
||||
import { Breakpoint } from "../backend";
|
||||
import * as ChildProcess from "child_process";
|
||||
import { posix } from "path";
|
||||
import * as nativePath from "path";
|
||||
const path = posix;
|
||||
|
||||
export class MI2_LLDB extends MI2 {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { MI2_LLDB } from "./mi2lldb"
|
||||
import { Stack } from "../backend"
|
||||
import { MINode } from "../mi_parse"
|
||||
import { MI2_LLDB } from "./mi2lldb";
|
||||
import { Stack } from "../backend";
|
||||
import { MINode } from "../mi_parse";
|
||||
|
||||
export class MI2_Mago extends MI2_LLDB {
|
||||
getStack(maxLevels: number, thread: number): Promise<Stack[]> {
|
||||
|
|
@ -29,7 +29,7 @@ export class MI2_Mago extends MI2_LLDB {
|
|||
level: level,
|
||||
line: line
|
||||
});
|
||||
}
|
||||
};
|
||||
stack.forEach(element => {
|
||||
if (element)
|
||||
if (element[0] == "stack") {
|
||||
|
|
|
|||
14
src/gdb.ts
14
src/gdb.ts
|
|
@ -87,10 +87,10 @@ class GDBDebugSession extends MI2DebugSession {
|
|||
if (this.crashed)
|
||||
this.handlePause(undefined);
|
||||
}, err => {
|
||||
this.sendErrorResponse(response, 100, `Failed to start MI Debugger: ${err.toString()}`)
|
||||
this.sendErrorResponse(response, 100, `Failed to start MI Debugger: ${err.toString()}`);
|
||||
});
|
||||
}, err => {
|
||||
this.sendErrorResponse(response, 102, `Failed to SSH: ${err.toString()}`)
|
||||
this.sendErrorResponse(response, 102, `Failed to SSH: ${err.toString()}`);
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
|
@ -108,10 +108,10 @@ class GDBDebugSession extends MI2DebugSession {
|
|||
if (this.crashed)
|
||||
this.handlePause(undefined);
|
||||
}, err => {
|
||||
this.sendErrorResponse(response, 100, `Failed to Start MI Debugger: ${err.toString()}`)
|
||||
this.sendErrorResponse(response, 100, `Failed to Start MI Debugger: ${err.toString()}`);
|
||||
});
|
||||
}, err => {
|
||||
this.sendErrorResponse(response, 103, `Failed to load MI Debugger: ${err.toString()}`)
|
||||
this.sendErrorResponse(response, 103, `Failed to load MI Debugger: ${err.toString()}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -151,7 +151,7 @@ class GDBDebugSession extends MI2DebugSession {
|
|||
}, 50);
|
||||
this.sendResponse(response);
|
||||
}, err => {
|
||||
this.sendErrorResponse(response, 102, `Failed to SSH: ${err.toString()}`)
|
||||
this.sendErrorResponse(response, 102, `Failed to SSH: ${err.toString()}`);
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
|
@ -163,7 +163,7 @@ class GDBDebugSession extends MI2DebugSession {
|
|||
});
|
||||
this.sendResponse(response);
|
||||
}, err => {
|
||||
this.sendErrorResponse(response, 102, `Failed to attach: ${err.toString()}`)
|
||||
this.sendErrorResponse(response, 102, `Failed to attach: ${err.toString()}`);
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
|
@ -174,7 +174,7 @@ class GDBDebugSession extends MI2DebugSession {
|
|||
});
|
||||
this.sendResponse(response);
|
||||
}, err => {
|
||||
this.sendErrorResponse(response, 101, `Failed to attach: ${err.toString()}`)
|
||||
this.sendErrorResponse(response, 101, `Failed to attach: ${err.toString()}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ export class MI2DebugSession extends DebugSession {
|
|||
}
|
||||
catch (err) {
|
||||
this.sendErrorResponse(response, 11, `Could not continue: ${err}`);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
protected setFunctionBreakPointsRequest(response: DebugProtocol.SetFunctionBreakpointsResponse, args: DebugProtocol.SetFunctionBreakpointsArguments): void {
|
||||
|
|
@ -321,7 +321,7 @@ export class MI2DebugSession extends DebugSession {
|
|||
};
|
||||
this.sendResponse(response);
|
||||
}, err => {
|
||||
this.sendErrorResponse(response, 12, `Failed to get Stack Trace: ${err.toString()}`)
|
||||
this.sendErrorResponse(response, 12, `Failed to get Stack Trace: ${err.toString()}`);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -500,7 +500,7 @@ export class MI2DebugSession extends DebugSession {
|
|||
|
||||
response.body = {
|
||||
variables: vars
|
||||
}
|
||||
};
|
||||
this.sendResponse(response);
|
||||
}
|
||||
catch (err) {
|
||||
|
|
@ -647,7 +647,7 @@ export class MI2DebugSession extends DebugSession {
|
|||
response.body = {
|
||||
variablesReference: 0,
|
||||
result: res.result("value")
|
||||
}
|
||||
};
|
||||
this.sendResponse(response);
|
||||
}, msg => {
|
||||
this.sendErrorResponse(response, 7, msg.toString());
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
"ordered-imports": false,
|
||||
"quotemark": false,
|
||||
"radix": false,
|
||||
"semicolon": false,
|
||||
"space-before-function-paren": false,
|
||||
"trailing-comma": false,
|
||||
"triple-equals": false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue