Print string-based diff if there's a mismatch of two strings
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- clojure
- 領域
- testing-qa
調査の方向性
まず deep-diff2.printer-impl/print-mismatch と既存の mismatch 出力動作を読みます。文字列同士の mismatch をどのように表示するか、複数行の値を含めて、またその動作にオプションが必要かどうかを決めます。既存の consumer を壊さずに、git のような有用な出力が得られれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I sometimes need to write tests for functions that output strings, in particular multi-line strings. Right now deep-diff2 will just say -<expected-string> +<actual-string>, which isn't very useful for longer strings and strings containing newlines.
Right now I try to work around this by splitting the strings on newlines and letting deep-diff2 diff the arrays, which at least will highlight the lines with changes, but it's not great.
I think it'd be useful to print a string-based diff, like git-diff would, if both expressions for a mismatch are string.
For no newlines they could still be printed in place, but for newlines it likely would make sense to introduce a linebreak and then show the diff without worrying about indentation.
I found deep-diff2.printer-impl/print-mismatch, and (and (string? (:- expr)) (string? (:+ expr))) seems like an easy enough condition there, so I'm playing around with it.
Would you consider this for deep-diff2, or do you see problems with the approach? Perhaps it could be an option to not break any existing consumers.
- 主要言語
- Clojure
- スター
- 326
- フォーク
- 18
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
lambdaisland/deep-diff2 のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
lambdaisland/deep-diff2#53 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
lambdaisland/deep-diff2#52 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
lambdaisland/deep-diff2#51 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
lambdaisland/deep-diff2#20 ·
-
enhancement help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
lambdaisland/deep-diff2#14 · コメント 12 件 ·
lambdaisland/deep-diff2 の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
.Team/Metabot Priority:P3
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
needs triage
難易度 1/5 1時間未満 初心者へのやさしさ 90/100