mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-04 16:23:31 +08:00
docs(ja-JP): translate plain text code blocks to Japanese
Translate English prose inside plain text code blocks (```text, ```) across ja-JP documentation to Japanese, following the same approach as PR #753 (zh-CN translation). Translated content includes: - Output template labels and status messages - Folder tree inline comments - CLI workflow descriptions - Error/warning message examples - Commit message templates and PR title examples Technical identifiers, file paths, and actual code remain untranslated.
This commit is contained in:
@@ -35,12 +35,12 @@ echo "$(date +%Y-%m-%d-%H:%M) | $CHECKPOINT_NAME | $(git rev-parse --short HEAD)
|
||||
3. レポート:
|
||||
|
||||
```
|
||||
CHECKPOINT COMPARISON: $NAME
|
||||
チェックポイント比較: $NAME
|
||||
============================
|
||||
Files changed: X
|
||||
Tests: +Y passed / -Z failed
|
||||
Coverage: +X% / -Y%
|
||||
Build: [PASS/FAIL]
|
||||
変更されたファイル: X
|
||||
テスト: +Y 合格 / -Z 失敗
|
||||
カバレッジ: +X% / -Y%
|
||||
ビルド: [PASS/FAIL]
|
||||
```
|
||||
|
||||
## チェックポイント一覧表示
|
||||
@@ -57,13 +57,13 @@ Build: [PASS/FAIL]
|
||||
一般的なチェックポイント流:
|
||||
|
||||
```
|
||||
[Start] --> /checkpoint create "feature-start"
|
||||
[開始] --> /checkpoint create "feature-start"
|
||||
|
|
||||
[Implement] --> /checkpoint create "core-done"
|
||||
[実装] --> /checkpoint create "core-done"
|
||||
|
|
||||
[Test] --> /checkpoint verify "core-done"
|
||||
[テスト] --> /checkpoint verify "core-done"
|
||||
|
|
||||
[Refactor] --> /checkpoint create "refactor-done"
|
||||
[リファクタリング] --> /checkpoint create "refactor-done"
|
||||
|
|
||||
[PR] --> /checkpoint verify "feature-start"
|
||||
```
|
||||
|
||||
@@ -38,24 +38,24 @@ e2e-runner エージェントは:
|
||||
## 使用します示例
|
||||
|
||||
````
|
||||
User: /e2e Test the market search and view flow
|
||||
User: /e2e マーケット検索と表示フローをテスト
|
||||
|
||||
Agent (e2e-runner):
|
||||
# E2E Test Generation: Market Search and View Flow
|
||||
# E2Eテスト生成: マーケット検索と表示フロー
|
||||
|
||||
## Test Scenario Identified
|
||||
## 特定されたテストシナリオ
|
||||
|
||||
**User Journey:** Market Search → View Results → Click Market → View Details
|
||||
**ユーザージャーニー:** マーケット検索 → 結果表示 → マーケットクリック → 詳細表示
|
||||
|
||||
**Test Coverage:**
|
||||
1. Navigate to markets page
|
||||
2. Perform semantic search
|
||||
3. Verify search results
|
||||
4. Click on first result
|
||||
5. Verify market details page loads
|
||||
6. Verify chart renders
|
||||
**テストカバレッジ:**
|
||||
1. マーケットページに遷移
|
||||
2. セマンティック検索を実行
|
||||
3. 検索結果を検証
|
||||
4. 最初の結果をクリック
|
||||
5. マーケット詳細ページの読み込みを検証
|
||||
6. チャートの描画を検証
|
||||
|
||||
## Generated Test Code
|
||||
## 生成されたテストコード
|
||||
|
||||
```typescript
|
||||
// tests/e2e/markets/search-and-view.spec.ts
|
||||
@@ -160,18 +160,18 @@ test.describe('Market Search and View Flow', () => {
|
||||
## テスト実行
|
||||
|
||||
```bash
|
||||
# Run the generated test
|
||||
# 生成されたテストを実行
|
||||
npx playwright test tests/e2e/markets/search-and-view.spec.ts
|
||||
|
||||
Running 3 tests using 3 workers
|
||||
3つのテストを3ワーカーで実行中
|
||||
|
||||
✓ [chromium] › search-and-view.spec.ts:5:3 › user can search markets and view details (4.2s)
|
||||
✓ [chromium] › search-and-view.spec.ts:52:3 › search with no results shows empty state (1.8s)
|
||||
✓ [chromium] › search-and-view.spec.ts:67:3 › can clear search and see all markets again (2.9s)
|
||||
|
||||
3 passed (9.1s)
|
||||
3件合格 (9.1s)
|
||||
|
||||
Artifacts generated:
|
||||
生成されたアーティファクト:
|
||||
- artifacts/search-results.png
|
||||
- artifacts/market-details.png
|
||||
- playwright-report/index.html
|
||||
@@ -181,54 +181,54 @@ Artifacts generated:
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ E2E Test Results ║
|
||||
║ E2Eテスト結果 ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Status: ✅ ALL TESTS PASSED ║
|
||||
║ Total: 3 tests ║
|
||||
║ Passed: 3 (100%) ║
|
||||
║ Failed: 0 ║
|
||||
║ Flaky: 0 ║
|
||||
║ Duration: 9.1s ║
|
||||
║ ステータス: ✅ 全テスト合格 ║
|
||||
║ 合計: 3テスト ║
|
||||
║ 合格: 3 (100%) ║
|
||||
║ 失敗: 0 ║
|
||||
║ 不安定: 0 ║
|
||||
║ 所要時間: 9.1s ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
|
||||
Artifacts:
|
||||
📸 Screenshots: 2 files
|
||||
📹 Videos: 0 files (only on failure)
|
||||
🔍 Traces: 0 files (only on failure)
|
||||
📊 HTML Report: playwright-report/index.html
|
||||
アーティファクト:
|
||||
📸 スクリーンショット: 2ファイル
|
||||
📹 ビデオ: 0ファイル (失敗時のみ)
|
||||
🔍 トレース: 0ファイル (失敗時のみ)
|
||||
📊 HTMLレポート: playwright-report/index.html
|
||||
|
||||
View report: npx playwright show-report
|
||||
レポート表示: npx playwright show-report
|
||||
```
|
||||
|
||||
✅ E2E テストスイートは CI/CD 統合の準備ができました!
|
||||
|
||||
````
|
||||
|
||||
## Test Artifacts
|
||||
## テストアーティファクト
|
||||
|
||||
When tests run, the following artifacts are captured:
|
||||
テスト実行時、以下のアーティファクトがキャプチャされます:
|
||||
|
||||
**On All Tests:**
|
||||
- HTML Report with timeline and results
|
||||
- JUnit XML for CI integration
|
||||
**全テスト共通:**
|
||||
- タイムラインと結果を含むHTMLレポート
|
||||
- CI統合用のJUnit XML
|
||||
|
||||
**On Failure Only:**
|
||||
- Screenshot of the failing state
|
||||
- Video recording of the test
|
||||
- Trace file for debugging (step-by-step replay)
|
||||
- Network logs
|
||||
- Console logs
|
||||
**失敗時のみ:**
|
||||
- 失敗状態のスクリーンショット
|
||||
- テストのビデオ録画
|
||||
- デバッグ用トレースファイル (ステップバイステップ再生)
|
||||
- ネットワークログ
|
||||
- コンソールログ
|
||||
|
||||
## Viewing Artifacts
|
||||
## アーティファクトの確認
|
||||
|
||||
```bash
|
||||
# View HTML report in browser
|
||||
# ブラウザでHTMLレポートを表示
|
||||
npx playwright show-report
|
||||
|
||||
# View specific trace file
|
||||
# 特定のトレースファイルを表示
|
||||
npx playwright show-trace artifacts/trace-abc123.zip
|
||||
|
||||
# Screenshots are saved in artifacts/ directory
|
||||
# スクリーンショットはartifacts/ディレクトリに保存
|
||||
open artifacts/search-results.png
|
||||
````
|
||||
|
||||
@@ -239,18 +239,18 @@ open artifacts/search-results.png
|
||||
```
|
||||
⚠️ FLAKY TEST DETECTED: tests/e2e/markets/trade.spec.ts
|
||||
|
||||
Test passed 7/10 runs (70% pass rate)
|
||||
テストは10回中7回合格 (合格率70%)
|
||||
|
||||
Common failure:
|
||||
よくある失敗:
|
||||
"Timeout waiting for element '[data-testid="confirm-btn"]'"
|
||||
|
||||
Recommended fixes:
|
||||
1. Add explicit wait: await page.waitForSelector('[data-testid="confirm-btn"]')
|
||||
2. Increase timeout: { timeout: 10000 }
|
||||
3. Check for race conditions in component
|
||||
4. Verify element is not hidden by animation
|
||||
推奨修正:
|
||||
1. 明示的な待機を追加: await page.waitForSelector('[data-testid="confirm-btn"]')
|
||||
2. タイムアウトを増加: { timeout: 10000 }
|
||||
3. コンポーネントの競合状態を確認
|
||||
4. 要素がアニメーションで隠れていないか確認
|
||||
|
||||
Quarantine recommendation: Mark as test.fixme() until fixed
|
||||
隔離推奨: 修正されるまでtest.fixme()としてマーク
|
||||
```
|
||||
|
||||
## ブラウザ設定
|
||||
@@ -350,21 +350,21 @@ PMX の場合、以下の E2E テストを優先:
|
||||
## 快速命令
|
||||
|
||||
```bash
|
||||
# Run all E2E tests
|
||||
# 全E2Eテストを実行
|
||||
npx playwright test
|
||||
|
||||
# Run specific test file
|
||||
# 特定のテストファイルを実行
|
||||
npx playwright test tests/e2e/markets/search.spec.ts
|
||||
|
||||
# Run in headed mode (see browser)
|
||||
# ヘッドモードで実行 (ブラウザ表示)
|
||||
npx playwright test --headed
|
||||
|
||||
# Debug test
|
||||
# テストをデバッグ
|
||||
npx playwright test --debug
|
||||
|
||||
# Generate test code
|
||||
# テストコードを生成
|
||||
npx playwright codegen http://localhost:3000
|
||||
|
||||
# View report
|
||||
# レポートを表示
|
||||
npx playwright show-report
|
||||
```
|
||||
|
||||
@@ -92,36 +92,36 @@ instinctsが分離の恩恵を受ける複雑な複数ステップのプロセ
|
||||
## 出力フォーマット
|
||||
|
||||
```
|
||||
🧬 Evolve Analysis
|
||||
🧬 進化分析
|
||||
==================
|
||||
|
||||
進化の準備ができた3つのクラスターを発見:
|
||||
|
||||
## クラスター1: データベースマイグレーションワークフロー
|
||||
Instincts: new-table-migration, update-schema, regenerate-types
|
||||
Type: Command
|
||||
Confidence: 85%(12件の観測に基づく)
|
||||
タイプ: Command
|
||||
信頼度: 85%(12件の観測に基づく)
|
||||
|
||||
作成: /new-tableコマンド
|
||||
Files:
|
||||
ファイル:
|
||||
- ~/.claude/homunculus/evolved/commands/new-table.md
|
||||
|
||||
## クラスター2: 関数型コードスタイル
|
||||
Instincts: prefer-functional, use-immutable, avoid-classes, pure-functions
|
||||
Type: Skill
|
||||
Confidence: 78%(8件の観測に基づく)
|
||||
タイプ: Skill
|
||||
信頼度: 78%(8件の観測に基づく)
|
||||
|
||||
作成: functional-patternsスキル
|
||||
Files:
|
||||
ファイル:
|
||||
- ~/.claude/homunculus/evolved/skills/functional-patterns.md
|
||||
|
||||
## クラスター3: デバッグプロセス
|
||||
Instincts: debug-check-logs, debug-isolate, debug-reproduce, debug-verify
|
||||
Type: Agent
|
||||
Confidence: 72%(6件の観測に基づく)
|
||||
タイプ: Agent
|
||||
信頼度: 72%(6件の観測に基づく)
|
||||
|
||||
作成: debuggerエージェント
|
||||
Files:
|
||||
ファイル:
|
||||
- ~/.claude/homunculus/evolved/agents/debugger.md
|
||||
|
||||
---
|
||||
|
||||
@@ -62,9 +62,9 @@ internal/handler/api.go:58:2: missing return at end of function
|
||||
|
||||
## 修正1: 未定義の識別子
|
||||
|
||||
File: internal/service/user.go:25
|
||||
Error: undefined: UserRepository
|
||||
Cause: インポート欠落
|
||||
ファイル: internal/service/user.go:25
|
||||
エラー: undefined: UserRepository
|
||||
原因: インポート欠落
|
||||
|
||||
```go
|
||||
// インポートを追加
|
||||
@@ -83,8 +83,8 @@ $ go build ./...
|
||||
|
||||
## 修正2: 型の不一致
|
||||
|
||||
File: internal/handler/api.go:42
|
||||
Error: cannot use x (type string) as type int
|
||||
ファイル: internal/handler/api.go:42
|
||||
エラー: cannot use x (type string) as type int
|
||||
|
||||
```go
|
||||
// 変更前
|
||||
@@ -101,8 +101,8 @@ $ go build ./...
|
||||
|
||||
## 修正3: 戻り値の欠落
|
||||
|
||||
File: internal/handler/api.go:58
|
||||
Error: missing return at end of function
|
||||
ファイル: internal/handler/api.go:58
|
||||
エラー: missing return at end of function
|
||||
|
||||
```go
|
||||
func GetUser(id string) (*User, error) {
|
||||
|
||||
@@ -85,8 +85,8 @@ Agent:
|
||||
## 発見された問題
|
||||
|
||||
[CRITICAL] 競合状態
|
||||
File: internal/service/auth.go:45
|
||||
Issue: 同期化なしで共有マップにアクセス
|
||||
ファイル: internal/service/auth.go:45
|
||||
問題: 同期化なしで共有マップにアクセス
|
||||
```go
|
||||
var cache = map[string]*Session{} // 並行アクセス!
|
||||
|
||||
@@ -94,7 +94,7 @@ func GetSession(id string) *Session {
|
||||
return cache[id] // 競合状態
|
||||
}
|
||||
```
|
||||
Fix: sync.RWMutexまたはsync.Mapを使用
|
||||
修正: sync.RWMutexまたはsync.Mapを使用
|
||||
```go
|
||||
var (
|
||||
cache = map[string]*Session{}
|
||||
@@ -109,12 +109,12 @@ func GetSession(id string) *Session {
|
||||
```
|
||||
|
||||
[HIGH] エラーコンテキストの欠落
|
||||
File: internal/handler/user.go:28
|
||||
Issue: コンテキストなしでエラーを返す
|
||||
ファイル: internal/handler/user.go:28
|
||||
問題: コンテキストなしでエラーを返す
|
||||
```go
|
||||
return err // コンテキストなし
|
||||
```
|
||||
Fix: コンテキストでラップ
|
||||
修正: コンテキストでラップ
|
||||
```go
|
||||
return fmt.Errorf("get user %s: %w", userID, err)
|
||||
```
|
||||
|
||||
@@ -45,40 +45,40 @@ python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py import <
|
||||
## インポートプロセス
|
||||
|
||||
```
|
||||
📥 Importing instincts from: team-instincts.yaml
|
||||
📥 instinctsをインポート中: team-instincts.yaml
|
||||
================================================
|
||||
|
||||
Found 12 instincts to import.
|
||||
12件のinstinctsが見つかりました。
|
||||
|
||||
Analyzing conflicts...
|
||||
競合を分析中...
|
||||
|
||||
## New Instincts (8)
|
||||
These will be added:
|
||||
## 新規instincts (8)
|
||||
以下が追加されます:
|
||||
✓ use-zod-validation (confidence: 0.7)
|
||||
✓ prefer-named-exports (confidence: 0.65)
|
||||
✓ test-async-functions (confidence: 0.8)
|
||||
...
|
||||
|
||||
## Duplicate Instincts (3)
|
||||
Already have similar instincts:
|
||||
## 重複instincts (3)
|
||||
類似のinstinctsが既に存在:
|
||||
⚠️ prefer-functional-style
|
||||
Local: 0.8 confidence, 12 observations
|
||||
Import: 0.7 confidence
|
||||
→ Keep local (higher confidence)
|
||||
ローカル: 信頼度0.8, 12回の観測
|
||||
インポート: 信頼度0.7
|
||||
→ ローカルを保持 (信頼度が高い)
|
||||
|
||||
⚠️ test-first-workflow
|
||||
Local: 0.75 confidence
|
||||
Import: 0.9 confidence
|
||||
→ Update to import (higher confidence)
|
||||
ローカル: 信頼度0.75
|
||||
インポート: 信頼度0.9
|
||||
→ インポートに更新 (信頼度が高い)
|
||||
|
||||
## Conflicting Instincts (1)
|
||||
These contradict local instincts:
|
||||
## 競合instincts (1)
|
||||
ローカルのinstinctsと矛盾:
|
||||
❌ use-classes-for-services
|
||||
Conflicts with: avoid-classes
|
||||
→ Skip (requires manual resolution)
|
||||
競合: avoid-classes
|
||||
→ スキップ (手動解決が必要)
|
||||
|
||||
---
|
||||
Import 8 new, update 1, skip 3?
|
||||
8件を新規追加、1件を更新、3件をスキップしますか?
|
||||
```
|
||||
|
||||
## マージ戦略
|
||||
@@ -130,13 +130,13 @@ Skill Creatorからインポートする場合:
|
||||
|
||||
インポート後:
|
||||
```
|
||||
✅ Import complete!
|
||||
✅ インポート完了!
|
||||
|
||||
Added: 8 instincts
|
||||
Updated: 1 instinct
|
||||
Skipped: 3 instincts (2 duplicates, 1 conflict)
|
||||
追加: 8件のinstincts
|
||||
更新: 1件のinstinct
|
||||
スキップ: 3件のinstincts (2件の重複, 1件の競合)
|
||||
|
||||
New instincts saved to: ~/.claude/homunculus/instincts/inherited/
|
||||
新規instinctsの保存先: ~/.claude/homunculus/instincts/inherited/
|
||||
|
||||
Run /instinct-status to see all instincts.
|
||||
/instinct-statusを実行してすべてのinstinctsを確認できます。
|
||||
```
|
||||
|
||||
@@ -39,42 +39,42 @@ python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py status
|
||||
## 出力形式
|
||||
|
||||
```
|
||||
📊 Instinct Status
|
||||
📊 instinctステータス
|
||||
==================
|
||||
|
||||
## Code Style (4 instincts)
|
||||
## コードスタイル (4 instincts)
|
||||
|
||||
### prefer-functional-style
|
||||
Trigger: when writing new functions
|
||||
Action: Use functional patterns over classes
|
||||
Confidence: ████████░░ 80%
|
||||
Source: session-observation | Last updated: 2025-01-22
|
||||
トリガー: 新しい関数を書くとき
|
||||
アクション: クラスより関数型パターンを使用
|
||||
信頼度: ████████░░ 80%
|
||||
ソース: session-observation | 最終更新: 2025-01-22
|
||||
|
||||
### use-path-aliases
|
||||
Trigger: when importing modules
|
||||
Action: Use @/ path aliases instead of relative imports
|
||||
Confidence: ██████░░░░ 60%
|
||||
Source: repo-analysis (github.com/acme/webapp)
|
||||
トリガー: モジュールをインポートするとき
|
||||
アクション: 相対インポートの代わりに@/パスエイリアスを使用
|
||||
信頼度: ██████░░░░ 60%
|
||||
ソース: repo-analysis (github.com/acme/webapp)
|
||||
|
||||
## Testing (2 instincts)
|
||||
## テスト (2 instincts)
|
||||
|
||||
### test-first-workflow
|
||||
Trigger: when adding new functionality
|
||||
Action: Write test first, then implementation
|
||||
Confidence: █████████░ 90%
|
||||
Source: session-observation
|
||||
トリガー: 新しい機能を追加するとき
|
||||
アクション: テストを先に書き、次に実装
|
||||
信頼度: █████████░ 90%
|
||||
ソース: session-observation
|
||||
|
||||
## Workflow (3 instincts)
|
||||
## ワークフロー (3 instincts)
|
||||
|
||||
### grep-before-edit
|
||||
Trigger: when modifying code
|
||||
Action: Search with Grep, confirm with Read, then Edit
|
||||
Confidence: ███████░░░ 70%
|
||||
Source: session-observation
|
||||
トリガー: コードを変更するとき
|
||||
アクション: Grepで検索、Readで確認、次にEdit
|
||||
信頼度: ███████░░░ 70%
|
||||
ソース: session-observation
|
||||
|
||||
---
|
||||
Total: 9 instincts (4 personal, 5 inherited)
|
||||
Observer: Running (last analysis: 5 min ago)
|
||||
合計: 9 instincts (4個人, 5継承)
|
||||
オブザーバー: 実行中 (最終分析: 5分前)
|
||||
```
|
||||
|
||||
## フラグ
|
||||
|
||||
@@ -99,36 +99,36 @@ security-reviewer -> code-reviewer -> architect
|
||||
## 最終レポート形式
|
||||
|
||||
```
|
||||
ORCHESTRATION REPORT
|
||||
オーケストレーションレポート
|
||||
====================
|
||||
Workflow: feature
|
||||
Task: Add user authentication
|
||||
Agents: planner -> tdd-guide -> code-reviewer -> security-reviewer
|
||||
ワークフロー: feature
|
||||
タスク: ユーザー認証の追加
|
||||
エージェント: planner -> tdd-guide -> code-reviewer -> security-reviewer
|
||||
|
||||
SUMMARY
|
||||
サマリー
|
||||
-------
|
||||
[1段落の要約]
|
||||
|
||||
AGENT OUTPUTS
|
||||
エージェント出力
|
||||
-------------
|
||||
Planner: [要約]
|
||||
TDD Guide: [要約]
|
||||
Code Reviewer: [要約]
|
||||
Security Reviewer: [要約]
|
||||
|
||||
FILES CHANGED
|
||||
変更ファイル
|
||||
-------------
|
||||
[変更されたすべてのファイルをリスト]
|
||||
|
||||
TEST RESULTS
|
||||
テスト結果
|
||||
------------
|
||||
[テスト合格/不合格の要約]
|
||||
|
||||
SECURITY STATUS
|
||||
セキュリティステータス
|
||||
---------------
|
||||
[セキュリティの発見事項]
|
||||
|
||||
RECOMMENDATION
|
||||
推奨事項
|
||||
--------------
|
||||
[リリース可 / 要修正 / ブロック中]
|
||||
```
|
||||
|
||||
@@ -95,26 +95,26 @@ Agent:
|
||||
## 発見された問題
|
||||
|
||||
[CRITICAL] SQLインジェクション脆弱性
|
||||
File: app/routes/user.py:42
|
||||
Issue: ユーザー入力が直接SQLクエリに挿入されている
|
||||
ファイル: app/routes/user.py:42
|
||||
問題: ユーザー入力が直接SQLクエリに挿入されている
|
||||
```python
|
||||
query = f"SELECT * FROM users WHERE id = {user_id}" # 悪い
|
||||
```
|
||||
Fix: パラメータ化クエリを使用
|
||||
修正: パラメータ化クエリを使用
|
||||
```python
|
||||
query = "SELECT * FROM users WHERE id = %s" # 良い
|
||||
cursor.execute(query, (user_id,))
|
||||
```
|
||||
|
||||
[HIGH] 可変デフォルト引数
|
||||
File: app/services/auth.py:18
|
||||
Issue: 可変デフォルト引数が共有状態を引き起こす
|
||||
ファイル: app/services/auth.py:18
|
||||
問題: 可変デフォルト引数が共有状態を引き起こす
|
||||
```python
|
||||
def process_items(items=[]): # 悪い
|
||||
items.append("new")
|
||||
return items
|
||||
```
|
||||
Fix: デフォルトにNoneを使用
|
||||
修正: デフォルトにNoneを使用
|
||||
```python
|
||||
def process_items(items=None): # 良い
|
||||
if items is None:
|
||||
@@ -124,27 +124,27 @@ def process_items(items=None): # 良い
|
||||
```
|
||||
|
||||
[MEDIUM] 型ヒントの欠落
|
||||
File: app/services/auth.py:25
|
||||
Issue: 型アノテーションのない公開関数
|
||||
ファイル: app/services/auth.py:25
|
||||
問題: 型アノテーションのない公開関数
|
||||
```python
|
||||
def get_user(user_id): # 悪い
|
||||
return db.find(user_id)
|
||||
```
|
||||
Fix: 型ヒントを追加
|
||||
修正: 型ヒントを追加
|
||||
```python
|
||||
def get_user(user_id: str) -> Optional[User]: # 良い
|
||||
return db.find(user_id)
|
||||
```
|
||||
|
||||
[MEDIUM] コンテキストマネージャーを使用していない
|
||||
File: app/routes/user.py:55
|
||||
Issue: 例外時にファイルがクローズされない
|
||||
ファイル: app/routes/user.py:55
|
||||
問題: 例外時にファイルがクローズされない
|
||||
```python
|
||||
f = open("config.json") # 悪い
|
||||
data = f.read()
|
||||
f.close()
|
||||
```
|
||||
Fix: コンテキストマネージャーを使用
|
||||
修正: コンテキストマネージャーを使用
|
||||
```python
|
||||
with open("config.json") as f: # 良い
|
||||
data = f.read()
|
||||
|
||||
@@ -36,16 +36,16 @@
|
||||
簡潔な検証レポートを生成します:
|
||||
|
||||
```
|
||||
VERIFICATION: [PASS/FAIL]
|
||||
検証結果: [PASS/FAIL]
|
||||
|
||||
Build: [OK/FAIL]
|
||||
Types: [OK/X errors]
|
||||
Lint: [OK/X issues]
|
||||
Tests: [X/Y passed, Z% coverage]
|
||||
Secrets: [OK/X found]
|
||||
Logs: [OK/X console.logs]
|
||||
ビルド: [OK/FAIL]
|
||||
型: [OK/Xエラー]
|
||||
Lint: [OK/X件の問題]
|
||||
テスト: [X/Y合格, Z%カバレッジ]
|
||||
シークレット: [OK/X件発見]
|
||||
ログ: [OK/X件のconsole.log]
|
||||
|
||||
Ready for PR: [YES/NO]
|
||||
PR準備完了: [YES/NO]
|
||||
```
|
||||
|
||||
重大な問題がある場合は、修正案とともにリストアップします。
|
||||
|
||||
Reference in New Issue
Block a user