MCPcopy Index your code
hub / github.com/projen/projen / checkToolConflicts

Method checkToolConflicts

src/python/python-project.ts:460–478  ·  view source on GitHub ↗
(
    activeToolName: string,
    tools: Record<string, boolean>,
  )

Source from the content-addressed store, hash-verified

458 }
459
460 private checkToolConflicts(
461 activeToolName: string,
462 tools: Record<string, boolean>,
463 ) {
464 if (tools[activeToolName]) {
465 // Collect names of other enabled tools excluding the active tool itself
466 const conflicts = Object.entries(tools)
467 .filter(([name, enabled]) => name !== activeToolName && enabled)
468 .map(([name]) => name);
469
470 if (conflicts.length) {
471 throw new Error(
472 `${activeToolName} cannot be used together with other tools, found the following incompatible tools enabled: ${conflicts.join(
473 ", ",
474 )}`,
475 );
476 }
477 }
478 }
479
480 /**
481 * Adds default gitignore options for a Python project based on

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected