Summary
Rustのinsta crateを使用してformatterのsnapshot testを実装します。
Motivation
- 現在、instaは依存に含まれているが未使用
- snapshot testにより、formatterの出力を視覚的に検証可能になる
- リグレッションの検出が容易になる
Implementation Plan
ext/rfmt/src/ にsnapshot testモジュールを追加
- 基本的なRuby構文のテストケースを作成
- クラス/メソッド定義
- 条件分岐 (if/elsif/else)
- ループ (while/until/for)
- Rails的な構文
cargo insta でsnapshot管理
Test Cases
- Simple class/method formatting
- Conditional statements
- Loop structures
- Block expressions
- Method chaining
Summary
Rustのinsta crateを使用してformatterのsnapshot testを実装します。
Motivation
Implementation Plan
ext/rfmt/src/にsnapshot testモジュールを追加cargo instaでsnapshot管理Test Cases