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

Function validateUserConfig

src/keybindings/validate.ts:312–330  ·  view source on GitHub ↗
(userBlocks: unknown)

Source from the content-addressed store, hash-verified

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

Callers 1

validateBindingsFunction · 0.70

Calls 2

validateBlockFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected