You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 21fae13
Browse filesBrowse the repository at this point in the historyBrowse files
Clean up dead code and other low-hanging tech debt
A few low-risk cleanups found while combing through the extension:
- Remove the unused `getTimestampString()` from `src/utils.ts`. It's been
dead since 2017 (`1b424000`), when "Add timestamps and log levels to all
extension-side log messages" moved timestamping into the `Logger` and
deleted its three call sites. It also had a latent bug: no zero-padding,
so it rendered times like `[9:5:3]`.
- Remove the unused `getWindowsSystemPowerShellPath()` from
`src/platform.ts`. It's been dead since #2238 (2019), which introduced
`PowerShellExeFinder` and deleted the `System32PowerShellPath` /
`SysnativePowerShellPath` / `SysWow64PowerShellPath` constants that
called it. The same path is now built inline in `findWinPS()`, with
proper bitness handling in `getSystem32Path()`.
- Replace `console.log` with `this.logger.writeDebug` in
`writePidIfInDevMode` (`src/session.ts`), per our `ILogger` convention.
While here, `await` the `fs.delete` it sits next to so the "Deleted PID
file" message is actually true — previously it was a floating promise and
the log ran before the delete resolved.
- Point the PSScriptAnalyzer rule docs link at `learn.microsoft.com`
instead of `docs.microsoft.com` (`src/features/CodeActions.ts`); the old
URL just 301s there anyway.
I left the Command Explorer's dead code alone since #5508 already rewrites
that file. Compile, lint, and format all pass; the touched code has no test
coverage so risk is low.
Drafted by Copilot (Claude Opus 4.8).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments