MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / validateUserConfig

Function validateUserConfig

source code/keybindings/validate.ts:314–332  ·  view source on GitHub ↗
(userBlocks: unknown)

Source from the content-addressed store, hash-verified

312 * Validate user keybinding config and return all warnings.
313 */
314export function validateUserConfig(userBlocks: unknown): KeybindingWarning[] {
315 const warnings: KeybindingWarning[] = []
316
317 if (!Array.isArray(userBlocks)) {
318 warnings.push({
319 type: 'parse_error',
320 severity: 'error',
321 message: 'keybindings.json must contain an array',
322 suggestion: 'Wrap your bindings in [ ]',
323 })
324 return warnings
325 }
326
327 for (let i = 0; i < userBlocks.length; i++) {
328 warnings.push(...validateBlock(userBlocks[i], i))
329 }
330
331 return warnings
332}
333
334/**
335 * Check for duplicate bindings within the same context.

Callers 1

validateBindingsFunction · 0.70

Calls 1

validateBlockFunction · 0.85

Tested by

no test coverage detected