Skip to content

fix: 引用符で囲まれた名前付き引数を正しく認識する - #101

Merged
milkeclair merged 1 commit into
mainfrom
fix/77-quoted-arguments
Nov 15, 2026
Merged

milkeclair merged 1 commit into
mainfrom
fix/77-quoted-arguments

Conversation

@milkeclair

Copy link
Copy Markdown
Owner

チケット番号

closed #77

やったこと

  • 引数全体を引用した "message=$value" でも名前付き引数を認識し、引数が不足しているという誤診断を解消します。
  • ASTの静的な先頭部分から既存の引用符除去処理で名前を取り出し、診断・署名ヘルプ・ホバーの判定を揃えます。
  • 引用・空文字・値の変数展開・位置引数との混在を回帰テストで確認し、引数契約の説明を更新します。

やらないこと

  • 原因はzlsの引数名照合にあるため、汎用Zshパーサーと実行時の引数取得は既存実装を利用します。

動作確認 (方法、事前準備、確認したこと、動画などの資料)

方法:

  • lsで npm test -- --maxWorkers=2 を実行し、ビルド・テストの型検査・Vitest全体を確認。

事前準備:

  • Node.js 24.22.3とロックファイルどおりの依存関係を使用。実サーバーテストはビルドしたNodeサーバーと実Zshを起動します。

確認したこと:

  • 全41ファイル・913テストが成功。最新mainへ追従したコミットでも同じ検証を実行。
  • #77の失敗ログ呼び出しと、名前付き引数の後に続く位置引数を確認。
  • stdio経由で診断・署名ヘルプ・ホバーを検証し、messageを省いた編集後には正しく不足を報告することを確認。
  • git diff --check が成功。

エビデンス:

  • WSLのコマンド実行環境には撮影対象のターミナル画面がないため、実行コマンド・テスト件数・実サーバーでの確認内容を記載しています。

その他 (レビュワーへの注意点など)

  • 名前に変数展開が含まれる引数は静的に確定せず、従来の保守的な判定を維持します。値側の展開は名前の照合と分けて扱います。

Remove shell quoting from the static AST word prefix before matching named arguments. This corrects missing-argument diagnostics, signature selection and hover for calls such as "message=$value" while leaving dynamic keys unresolved.

Cover the reported failure-log call and mixed positional/named arguments in diagnostics, providers and the compiled stdio server. Update the argument contract documentation.
@milkeclair milkeclair self-assigned this Nov 15, 2026
@milkeclair milkeclair added the bug Something isn't working label Nov 15, 2026
@milkeclair
milkeclair marked this pull request as ready for review November 15, 2026 05:01
@milkeclair
milkeclair merged commit f3b02ae into main Nov 15, 2026
3 checks passed
@milkeclair
milkeclair deleted the fix/77-quoted-arguments branch November 15, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dquoteで囲まれた引数をzlsが誤認識する

1 participant