Skip to content

feat: C language support#70

Merged
makinzm merged 2 commits intomainfrom
feat/pr69-c-language-support
Mar 23, 2026
Merged

feat: C language support#70
makinzm merged 2 commits intomainfrom
feat/pr69-c-language-support

Conversation

@makinzm
Copy link
Copy Markdown
Owner

@makinzm makinzm commented Mar 23, 2026

Summary

  • C 言語(.c/.h)のアーキテクチャチェック対応を追加
  • ParsedNames 構造体ガード(PR feat: ParsedNames 構造体によるコンパイルタイムガード #68)の実効性を確認 — 新言語追加時に symbols, variables, comments の3フィールドすべてを明示的に構築する必要がある
  • CLAUDE.md / .claude/rules/new-language.md に言語追加チェックリストを追加(CI dogfooding 忘れ防止)

変更内容

Parser (infrastructure/parser/c.rs)

  • #include "..." / #include <...> の tree-sitter パース
  • Symbol: 関数定義、struct/enum/union/typedef
  • Variable: グローバル変数宣言
  • Comment: 行/ブロックコメント

Resolver (infrastructure/resolver/c.rs)

  • #include "..." → Internal(相対パス正規化あり)
  • #include <stdio.h> 等 → Stdlib(C 標準 + POSIX ヘッダリスト)
  • #include <curl/curl.h> 等 → External

その他

  • DispatchingParser / DispatchingResolver に .c/.h 登録
  • SOURCE_EXTENSIONSc, h 追加
  • ext_to_languagec/h 追加(mille init 対応)
  • violation_detector に C の external crate_name 抽出(/ 区切り)追加
  • CI dogfooding ステップ追加

ドキュメント

  • README.md: フィーチャーマトリックスに C 列追加、設定例追加
  • Website: C 言語ガイド(ja + en)、index サポート表、sidebar 追加

Test plan

  • ユニットテスト: parser 8 ケース、resolver 5 ケース通過
  • E2E テスト 9 ケース全通過(valid, dep opt-in/out, naming)
  • CI dogfooding: tests/fixtures/c_samplemille check ステップ追加
  • 既存テスト全 364 ケース通過(regression なし)
  • lefthook(clippy + fmt + actionlint + test)全通過

🤖 Generated with Claude Code

makinzm and others added 2 commits March 23, 2026 23:19
- infrastructure/parser/c.rs: #include パース、Symbol/Variable/Comment 抽出(ParsedNames 対応)
- infrastructure/resolver/c.rs: "..." → Internal, <stdlib> → Stdlib, <other> → External
- DispatchingParser / DispatchingResolver に .c/.h 拡張子を登録
- SOURCE_EXTENSIONS に c, h を追加
- ext_to_language に c/h を追加(mille init 対応)
- violation_detector に C の external crate_name 抽出(/ 区切り)を追加
- E2E テスト 9 ケース全通過(valid, dep opt-in/out, naming)
- CI dogfooding ステップ追加(ci.yml)
- CLAUDE.md / .claude/rules/new-language.md に言語追加チェックリスト追加

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- README.md: フィーチャーマトリックスに C 列追加、C 設定例追加
- docs/TODO.md: C 言語サポート完了を記載
- website: C 言語ガイド(ja + en)、index.mdx サポート表更新、sidebar 追加

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@makinzm makinzm merged commit 33b13ad into main Mar 23, 2026
9 checks passed
@makinzm makinzm deleted the feat/pr69-c-language-support branch March 23, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant