Bug: R Code Generation Does Not Quote Parameters with Special Characters (e.g., `codes[]`)
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 1.2k
- フォーク
- 242
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
When using the library to convert an HTTP request into an R code snippet, parameters with special characters (such as codes[] or demo-param) are not being quoted correctly in the generated R code. This causes an error in R because such parameters are not valid without quotes.
In R, certain special characters like [], -, and others are not valid in unquoted object names. As a result, the generated R code fails to execute properly when using such parameters.
I also saw a test case at "https://github.com/Kong/httpsnippet/blob/master/src/targets/r/httr/fixtures/nested.r" which doesn't run in R,
it gives following error
Error: unexpected '=' in:
"queryString <- list(
foo[bar] ="
Execution halted
Instead it should be like this to run correctly and avoid any special character issues.
queryString <- list(
`foo[bar]` = "baz,zap",
`fiz` = "buz"
)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず src/targets/r/httr/fixtures/nested.r の R fixture を実行し、その queryString リストを生成する R target code を調べます。foo[bar] や demo-param などのキーで失敗を確認します。生成された snippet が有効な引用符付きの名前を使用し、R で正常に実行されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100