From 097ccecde0e3ecdadd06fbde2e8d0bc41fc5ba66 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 15 Sep 2026 03:02:45 -0700 Subject: [PATCH] fix(lint): name the home predicate for what it matches main enabled anti-slop/no-shape-in-symbol-names (#20785) after this branch was written. The predicate answers whether a path IS a home root, not whether it resembles one. --- src/main/worktree-removal-home-guard.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/worktree-removal-home-guard.ts b/src/main/worktree-removal-home-guard.ts index 01031aa0b7c..85596093c13 100644 --- a/src/main/worktree-removal-home-guard.ts +++ b/src/main/worktree-removal-home-guard.ts @@ -92,10 +92,10 @@ function resolveGuardHomePath(home: WorktreeRemovalHomeAuthority, pathOps: PathO } function isLikelyPosixHomeDirectory(resolvedWorktreePath: string, pathOps: PathOps): boolean { - return pathOps === posix && isPosixHomeShape(resolvedWorktreePath) + return pathOps === posix && isPosixHomeRoot(resolvedWorktreePath) } -function isPosixHomeShape(linuxPath: string): boolean { +function isPosixHomeRoot(linuxPath: string): boolean { return ( linuxPath === '/home' || linuxPath === '/root' || @@ -138,7 +138,7 @@ function isLikelyWslDistroHomeDirectory(resolvedWorktreePath: string, pathOps: P return false } const wsl = parseWslUncPath(resolvedWorktreePath) - return !!wsl && (wsl.linuxPath === '/' || isPosixHomeShape(trimTrailingSlash(wsl.linuxPath))) + return !!wsl && (wsl.linuxPath === '/' || isPosixHomeRoot(trimTrailingSlash(wsl.linuxPath))) } function isWslUncRemovalPath(resolvedWorktreePath: string): boolean {