-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exeと設定ファイルのパス取得関数をリファクタリングしてテストできるようにする #1512
exeと設定ファイルのパス取得関数をリファクタリングしてテストできるようにする #1512
Conversation
…ditor#1435 利用できないコマンドラインオプション「-WQ(INIファイルを出力して即終了)」を削除したことにより可能となったコード整理を実施する
❌ Build sakura 1.0.3356 failed (commit f095a4a1d4 by @sanomari) |
30ff159
to
f41f9c6
Compare
❌ Build sakura 1.0.3357 failed (commit 37ac09d961 by @sanomari) |
f41f9c6
to
fff3063
Compare
✅ Build sakura 1.0.3358 completed (commit c1a3c17a12 by @sanomari) |
❌ Build sakura 1.0.3359 failed (commit 5f3784063d by @sanomari) |
✅ Build sakura 1.0.3361 completed (commit b2a8a385a9 by @sanomari) |
✅ Build sakura 1.0.3362 completed (commit 8cb93e0399 by @sanomari) |
もしかしてSonarCloudの指摘事項を駆逐しようとしてます? 個人的には、残課題ありでもOKなつもりでいます。 |
✅ Build sakura 1.0.3363 completed (commit 12bcdf8594 by @sanomari) |
✅ Build sakura 1.0.3364 completed (commit 6e91d5bd30 by @sanomari) |
✅ Build sakura 1.0.3365 completed (commit e581649ebf by @sanomari) |
6549b71
to
1f1b98c
Compare
Kudos, SonarCloud Quality Gate passed! |
✅ Build sakura 1.0.3370 completed (commit e93e51042a by @sanomari) |
このあたりの修正でミスると「起動できない」になるので徹底的にやりました。 カバレッジに関してだけは残課題として残してしまいます。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
問題なさそうに見えます。
もともと自分がやりたかった変更を引き継いでもらった形なので、「対応を入れることそのもの」の是非判断については甘いかも知れません。
2chで報告されているデグレの原因になりうるのはこちらですかね。 詳細が何も書いてないので何がおきているかはわかりませんが。 |
これじゃないですかね? 1.0.3370以降で使えないとあり、このPRは1.0.3371でマージされています。 このPRはGetInidirの実装を変えていますが、コーナーケースをうまくハンドリングできてないかも知れないです。 |
N_SHAREDATA_VERSIONの修正ミスを訂正します。 SonarCloudの指摘に従ってdefineをconstexprに置換しましたが、既存のCマクロに悪影響が出るので元に戻します。
Revert change at #1512 partially
PR の目的
タイトル通りです。
カテゴリ
PR の背景
#1435 (comment) を参照してください。
PR のメリット
INIファイルパスの生成規則が少しわかりやすくなります。
PR のデメリット (トレードオフとかあれば)
なにもないと思います。
仕様・動作説明
表面的な仕様・動作に変更はありません。
このPRは共有メモリの構造体メンバーを変更するため、共有メモリバージョンを変更します。
このPRはINIファイルパスの生成規則を明確にします。
導出規則
PR の影響範囲
ちょっと広いです。
テスト内容
修正したコードのほぼすべてを網羅するテストを作成しました。
カバーできなかった行が3行あるので完全ではありませんが、充分なテストを行えていると思います。
なお、カバーできなかったのはプロファイル指定ありで起動するケースです。
関連 issue, PR
#1435
参考資料
https://cpprefjp.github.io/reference/filesystem/path/remove_filename.html
https://docs.microsoft.com/ja-jp/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderlocation
https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath
https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid
https://docs.microsoft.com/en-us/windows/win32/api/processenv/nf-processenv-expandenvironmentstringsw