update builtin

This commit is contained in:
nrslib 2026-02-13 06:33:03 +09:00
parent f8fe5f69d2
commit 7439709a32
2 changed files with 8 additions and 6 deletions

View File

@ -171,7 +171,7 @@ Code to remove:
| Pattern | Example | Verdict | | Pattern | Example | Verdict |
|---------|---------|---------| |---------|---------|---------|
| deprecated + no usage | `@deprecated` annotation with no one using it | Remove immediately | | deprecated + no usage | `@deprecated` annotation with no one using it | Remove immediately |
| Both old and new APIs exist | Old function remains alongside new function | Remove old | | Both old and new APIs exist | Old function remains alongside new function | Remove old, unless both have active usage sites |
| Completed migration wrapper | Wrapper created for compatibility but migration is complete | Remove | | Completed migration wrapper | Wrapper created for compatibility but migration is complete | Remove |
| Comment says "remove later" | `// TODO: remove after migration` left abandoned | Remove now | | Comment says "remove later" | `// TODO: remove after migration` left abandoned | Remove now |
| Excessive proxy/adapter usage | Complexity added solely for backward compatibility | Replace simply | | Excessive proxy/adapter usage | Complexity added solely for backward compatibility | Replace simply |
@ -186,8 +186,9 @@ Code to keep:
Decision criteria: Decision criteria:
1. Are there usage sites? -> Verify with grep/search. Remove if none 1. Are there usage sites? -> Verify with grep/search. Remove if none
2. Is it externally published? -> Can remove immediately if internal only 2. Do both old and new have usage sites? -> If both are currently in use, this may be intentional coexistence rather than backward compatibility. Check callers
3. Is migration complete? -> Remove if complete 3. Is it externally published? -> Can remove immediately if internal only
4. Is migration complete? -> Remove if complete
When AI says "for backward compatibility", be skeptical. Verify if it's truly necessary. When AI says "for backward compatibility", be skeptical. Verify if it's truly necessary.

View File

@ -171,7 +171,7 @@ AIは「後方互換のために」不要なコードを残しがちである。
| パターン | 例 | 判定 | | パターン | 例 | 判定 |
|---------|-----|------| |---------|-----|------|
| deprecated + 使用箇所なし | `@deprecated` アノテーション付きで誰も使っていない | 即削除 | | deprecated + 使用箇所なし | `@deprecated` アノテーション付きで誰も使っていない | 即削除 |
| 新APIと旧API両方存在 | 新関数があるのに旧関数も残っている | 旧を削除 | | 新APIと旧API両方存在 | 新関数があるのに旧関数も残っている | 両方に使用箇所がある場合を除き、旧を削除 |
| 移行済みのラッパー | 互換のために作ったが移行完了済み | 削除 | | 移行済みのラッパー | 互換のために作ったが移行完了済み | 削除 |
| コメントで「将来削除」 | `// TODO: remove after migration` が放置 | 今すぐ削除 | | コメントで「将来削除」 | `// TODO: remove after migration` が放置 | 今すぐ削除 |
| Proxy/アダプタの過剰使用 | 後方互換のためだけに複雑化 | シンプルに置換 | | Proxy/アダプタの過剰使用 | 後方互換のためだけに複雑化 | シンプルに置換 |
@ -186,8 +186,9 @@ AIは「後方互換のために」不要なコードを残しがちである。
判断基準: 判断基準:
1. 使用箇所があるか? → grep/検索で確認。なければ削除 1. 使用箇所があるか? → grep/検索で確認。なければ削除
2. 外部に公開しているか? → 内部のみなら即削除可能 2. 新旧両方に使用箇所があるか? → 両方が現在使われているなら、後方互換ではなく並存設計の可能性がある。呼び出し元を確認
3. 移行は完了したか? → 完了なら削除 3. 外部に公開しているか? → 内部のみなら即削除可能
4. 移行は完了したか? → 完了なら削除
AIが「後方互換のため」と言ったら疑う。本当に必要か確認せよ。 AIが「後方互換のため」と言ったら疑う。本当に必要か確認せよ。