Commit b3985cb
feat: Naming convention check with DI refactoring (#66)
* [chore] tasks/20260322-naming-convention/ タスクファイルを作成 because of PR65 作業開始
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* [test] naming convention チェック機能のテストを追加 (RED) because of NamingViolation 実装前にテストを先行コミット
- RawName / NameKind エンティティ (src/domain/entity/name.rs)
- LayerConfig に name_deny / name_targets フィールドを追加
- SeverityConfig に naming_violation フィールドを追加
- ViolationKind::NamingViolation を追加
- Parser トレイトに parse_names() メソッドを追加
- 各言語パーサーに parse_names() スタブ (todo!()) を追加
- ViolationDetector に detect_naming() スタブ (todo!()) を追加
- config / layer パーステスト, detect_naming() ユニットテストを追加
- E2E テスト tests/e2e_naming.rs と fixture tests/fixtures/naming/ を追加
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* [fix] naming convention チェック機能を実装 (GREEN) because of 全テストをパスさせるため
- LayerConfig に name_deny / name_targets フィールドを追加 (serde パース対応)
- SeverityConfig に naming_violation フィールドを追加 (デフォルト "error")
- ViolationKind::NamingViolation を追加
- Parser トレイトに parse_names() メソッドを追加
- 各言語パーサーに parse_names() 実装 (Rust/TypeScript/Python/Go/Java/Kotlin)
- ViolationDetector::detect_naming() 実装 (大文字小文字区別なし・部分一致)
- check_architecture::check() にファイルレベルチェックと detect_naming() 呼び出しを追加
- フォーマッター (terminal/json/github_actions) に NamingViolation の表示を追加
- 全既存テスト + 新規テスト (27件) すべてパス
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* [refactor] docs/TODO.md と README.md に naming convention 機能を追記 because of PR 作成前チェックリストを満たすため
- docs/TODO.md: PR65 完了チェック (naming_violation) を実装状況サマリーに追加
- README.md: feature matrix に Naming convention rules 行を追加
- README.md: [[layers]] Configuration Reference に name_deny / name_targets を追加
- README.md: Naming Convention Check のサンプル設定と説明を追加
- README.md: [severity] テーブルに naming_violation を追加
- tasks/20260322-naming-convention/TODO.md: 全サイクルを完了チェック
- tasks/20260322-naming-convention/timeline.md: GREEN/REFACTOR フェーズのログを追記
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* add naming rule
* [refactor] mille.toml から domain/usecase の name_deny を削除 because of 自己矛盾
mille 自体が多言語ツールのため、domain/usecase が go・python・java 等の
言語名を使うのは正当な設計。language 名を name_deny に列挙するのは
自己矛盾であり、誤検知を生んでいた。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* [fix] name_allow 設定を追加: composite word の false positive を抑制 because of "category" 内の "go" 等を誤検知しないため
name_deny のマッチング前に name_allow リストの文字列を除去する。
例: name_allow = ["category"] で "ImportCategory" が "go" に引っかからなくなる。
"GoCategory" のように standalone な keyword が残る場合は引き続き violation。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* [test] name_deny_ignore フィールドとテストを追加 (RED) because of テストファイル等を naming check から除外する機能
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* [fix] name_deny_ignore フィルタを実装 (GREEN) because of name_deny_ignore にマッチするファイルを naming check から除外するため
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* [refactor] README.md と TODO.md に name_allow / name_deny_ignore を追記 because of PR 作成前チェックリストを満たすため
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* [refactor] remove language-specific types from domain/usecase layers because of Clean Architecture naming convention compliance
- Remove ResolveConfig, TsResolveConfig, GoResolveConfig, JavaResolveConfig,
PythonResolveConfig from domain/entity/config.rs
- Remove resolve field from MilleConfig
- Add ResolveConfigGenerator trait in domain/repository (port)
- Add DefaultResolveConfigGenerator in infrastructure (adapter)
- Update TomlConfigRepository with two-pass parsing (load_with_resolve)
- Update DispatchingResolver.from_resolve_config to accept toml::Value
- Update runner.rs wiring to use new approach
- Update generate_toml to accept &dyn ResolveConfigGenerator
- Rename language-specific test names to pattern-based names
- Replace language-specific comments with pattern descriptions
- Result: 0 naming violations in domain/usecase, all 494 tests pass
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* [refactor] website にネーミング規則ドキュメントを追加 because of PR 作成前チェックリストを満たすため
- naming.mdx (ja/en) 新規作成: name_deny / name_allow / name_targets / name_deny_ignore
- severity.mdx に naming_violation を追記
- layers.mdx にネーミング関連フィールドを追記
- サイドバーに「ネーミング規則」を追加
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 3828c60 commit b3985cb
File tree
52 files changed
+3331
-365
lines changed- docs
- src
- domain
- entity
- repository
- service
- infrastructure
- parser
- repository
- resolver
- presentation/formatter
- usecase
- tasks
- 20260322-naming-convention
- 20260322-remove-lang-types
- tests
- fixtures/naming
- domain
- usecase
- website
- src/content/docs
- configuration
- en/configuration
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
52 files changed
+3331
-365
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
432 | 433 | | |
433 | 434 | | |
434 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
435 | 473 | | |
436 | 474 | | |
437 | 475 | | |
| |||
472 | 510 | | |
473 | 511 | | |
474 | 512 | | |
| 513 | + | |
475 | 514 | | |
476 | 515 | | |
477 | 516 | | |
478 | 517 | | |
479 | 518 | | |
480 | 519 | | |
481 | 520 | | |
| 521 | + | |
482 | 522 | | |
483 | 523 | | |
484 | 524 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 20 | | |
72 | 21 | | |
73 | 22 | | |
| |||
78 | 27 | | |
79 | 28 | | |
80 | 29 | | |
| 30 | + | |
| 31 | + | |
81 | 32 | | |
82 | 33 | | |
83 | 34 | | |
| |||
94 | 45 | | |
95 | 46 | | |
96 | 47 | | |
97 | | - | |
98 | 48 | | |
99 | 49 | | |
100 | 50 | | |
| |||
105 | 55 | | |
106 | 56 | | |
107 | 57 | | |
| 58 | + | |
108 | 59 | | |
109 | 60 | | |
110 | 61 | | |
| |||
119 | 70 | | |
120 | 71 | | |
121 | 72 | | |
122 | | - | |
123 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
124 | 76 | | |
125 | 77 | | |
126 | 78 | | |
127 | 79 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 80 | + | |
132 | 81 | | |
133 | 82 | | |
134 | 83 | | |
135 | 84 | | |
136 | 85 | | |
137 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
138 | 135 | | |
139 | 136 | | |
140 | 137 | | |
141 | 138 | | |
142 | | - | |
| 139 | + | |
143 | 140 | | |
144 | 141 | | |
145 | 142 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
153 | 147 | | |
154 | 148 | | |
155 | 149 | | |
156 | | - | |
157 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
158 | 153 | | |
159 | 154 | | |
160 | 155 | | |
161 | 156 | | |
162 | | - | |
| 157 | + | |
163 | 158 | | |
164 | | - | |
165 | | - | |
166 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
167 | 233 | | |
168 | 234 | | |
169 | 235 | | |
170 | 236 | | |
171 | | - | |
172 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
173 | 241 | | |
174 | 242 | | |
175 | 243 | | |
176 | 244 | | |
177 | | - | |
| 245 | + | |
178 | 246 | | |
179 | 247 | | |
180 | 248 | | |
181 | | - | |
182 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
183 | 253 | | |
184 | 254 | | |
0 commit comments