{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/tools\/ki-protokoll\/claude-hook\/quality\/post_rules.py",
"offset": 395,
"limit": 30
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/tools\/ki-protokoll\/claude-hook\/quality\/post_rules.py",
"content": "def w7_1_usecase_interface_dependency(file_path: str, content: str) -> List[str]:\n \"\"\"W7.1: UseCase mit Interface-Dependency - Hinweis zur Registrierung.\"\"\"\n if \"\/UseCases\/\" not in file_path:\n return []\n if is_in_allowlist(file_path, GLOBAL_ALLOWLIST):\n return []\n\n # Finde Constructor-Parameter die auf Interface enden\n constructor_match = re.search(r\"function\\s+__construct\\s*\\(([^)]*)\\)\", content, re.DOTALL)\n if not constructor_match:\n return []\n\n params = constructor_match.group(1)\n interface_deps = re.findall(r\"(\\w+Interface)\\s+\\$\", params)\n\n if interface_deps:\n return [f\"W7.1: Hint - UseCase uses interfaces: {', '.join(interface_deps)}. Ensure registered in services.php.\"]\n\n return []\n\n\n# =============================================================================\n# MAIN CHECK FUNCTION\n# =============================================================================\n\n# Alle aktiven Regeln\nRULES = [\n # Prüfung 1: SRP + KISS\n w1_1_class_size,\n w1_2_public_method_count,",
"numLines": 30,
"startLine": 395,
"totalLines": 468
}
}
}