diff --git a/src/backend/backend.ts b/src/backend/backend.ts index 54d47cd..8879c4c 100644 --- a/src/backend/backend.ts +++ b/src/backend/backend.ts @@ -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; diff --git a/src/backend/gdb_expansion.ts b/src/backend/gdb_expansion.ts index ae48de4..c0f3160 100644 --- a/src/backend/gdb_expansion.ts +++ b/src/backend/gdb_expansion.ts @@ -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_\-]*/; diff --git a/src/backend/linux/console.ts b/src/backend/linux/console.ts index c3cbea0..b355822 100644 --- a/src/backend/linux/console.ts +++ b/src/backend/linux/console.ts @@ -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 { return new Promise((resolve, reject) => { diff --git a/src/backend/mi2/mi2.ts b/src/backend/mi2/mi2.ts index 116bfaa..be071e8 100644 --- a/src/backend/mi2/mi2.ts +++ b/src/backend/mi2/mi2.ts @@ -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 { 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 { diff --git a/src/backend/mi2/mi2lldb.ts b/src/backend/mi2/mi2lldb.ts index 5cdf788..e1c1038 100644 --- a/src/backend/mi2/mi2lldb.ts +++ b/src/backend/mi2/mi2lldb.ts @@ -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 { diff --git a/src/backend/mi2/mi2mago.ts b/src/backend/mi2/mi2mago.ts index 43af661..999c7e4 100644 --- a/src/backend/mi2/mi2mago.ts +++ b/src/backend/mi2/mi2mago.ts @@ -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 { @@ -29,7 +29,7 @@ export class MI2_Mago extends MI2_LLDB { level: level, line: line }); - } + }; stack.forEach(element => { if (element) if (element[0] == "stack") { diff --git a/src/gdb.ts b/src/gdb.ts index 4dd479a..4b74079 100644 --- a/src/gdb.ts +++ b/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()}`); }); } } diff --git a/src/mibase.ts b/src/mibase.ts index 9c10fe7..16118ec 100644 --- a/src/mibase.ts +++ b/src/mibase.ts @@ -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()); diff --git a/tslint.json b/tslint.json index de37c34..8584678 100644 --- a/tslint.json +++ b/tslint.json @@ -34,7 +34,6 @@ "ordered-imports": false, "quotemark": false, "radix": false, - "semicolon": false, "space-before-function-paren": false, "trailing-comma": false, "triple-equals": false,