| { | |
| "task_id": "T35", | |
| "max_score": 20, | |
| "scoring_type": "keyword_group", | |
| "rules": { | |
| "encapsulation_violation": { | |
| "points": 5, | |
| "keywords": [ | |
| "encapsulation", | |
| "封装", | |
| "PUBLIC DATA", | |
| "public.*data", | |
| "information hiding", | |
| "信息隐藏", | |
| "getter.*method", | |
| "私有.*属性", | |
| "PRIVATE.*DATA", | |
| "暴露内部状态" | |
| ] | |
| }, | |
| "dependency_injection": { | |
| "points": 5, | |
| "keywords": [ | |
| "dependency injection", | |
| "依赖注入", | |
| "constructor injection", | |
| "hardcoded", | |
| "硬编码", | |
| "NEW zcl_logger", | |
| "mock", | |
| "testable", | |
| "接口注入", | |
| "IMPORTING.*io_logger" | |
| ] | |
| }, | |
| "separation_of_concerns": { | |
| "points": 5, | |
| "keywords": [ | |
| "separation of concerns", | |
| "关注点分离", | |
| "business logic", | |
| "data access", | |
| "SELECT.*method", | |
| "业务逻辑", | |
| "数据访问层", | |
| "repository pattern", | |
| "SOLID", | |
| "单一职责" | |
| ] | |
| }, | |
| "final_prevents_testing": { | |
| "points": 5, | |
| "keywords": [ | |
| "FINAL", | |
| "final.*class", | |
| "testability", | |
| "可测试", | |
| "subclass", | |
| "继承", | |
| "test double", | |
| "单元测试", | |
| "mock.*class", | |
| "DEFINITION PUBLIC CREATE PUBLIC" | |
| ] | |
| } | |
| } | |
| } | |