Skip to content

Commit 187fd21

Browse files
committed
chore(web/shell): #107 code-quality review — an unused constant and a dead assignment go
links.js declared FILE (vscode.FileType.File) and never used it: the existence check compares the stat's type with 'file'. input-parser.js set i = s.length right before the break that leaves the loop, and nothing reads i after it. The input-parser and links suites pass unchanged.
1 parent b978c3b commit 187fd21

2 files changed

Lines changed: 0 additions & 3 deletions

File tree

‎web/shell/src/terminal/input-parser.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ function createInputParser(options) {
123123
}
124124
takePaste(joined.slice(0, joined.length - keep));
125125
pasteTail = joined.slice(joined.length - keep);
126-
i = s.length;
127126
break;
128127
}
129128

‎web/shell/src/terminal/links.js‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ const MAX_LINE = 4000;
3535
const MAX_CANDIDATES = 100;
3636
/** A run of characters longer than this is not a path (a minified line, a base64 blob). */
3737
const MAX_PATH = 1024;
38-
/** vscode.FileType.File */
39-
const FILE = 1;
4038

4139
// leftmost-longest runs of path characters; the lookbehind keeps a match from starting inside another token
4240
const TOKEN = /(?<![\w./~@:+\\-])[^\s"'`<>()[\]{}|;,:*?\\=]+(?::([0-9]{1,7})(?::([0-9]{1,7}))?)?/gu;

0 commit comments

Comments
 (0)