MCPcopy Index your code
hub / github.com/codeaashu/claude-code / hasComplexColonValue

Function hasComplexColonValue

src/tools/PowerShellTool/pathValidation.ts:793–803  ·  view source on GitHub ↗

* Returns true if a colon-syntax value contains expression constructs that * mask the real runtime path (arrays, subexpressions, variables, backtick * escapes). The outer CommandParameterAst 'Parameter' element type hides * these from our AST walk, so we must detect them textually. * * Used in

(rawValue: string)

Source from the content-addressed store, hash-verified

791 * leafOnlyPathParams, and the unknown-param defense-in-depth branch.
792 */
793function hasComplexColonValue(rawValue: string): boolean {
794 return (
795 rawValue.includes(',') ||
796 rawValue.startsWith('(') ||
797 rawValue.startsWith('[') ||
798 rawValue.includes('`') ||
799 rawValue.includes('@(') ||
800 rawValue.startsWith('@{') ||
801 rawValue.includes('$')
802 )
803}
804
805function formatDirectoryList(directories: string[]): string {
806 const dirCount = directories.length

Callers 1

extractPathsFromCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected