dotnet/runtime

Add an editorconfig option to supress LibraryImport suggestion for blittable PInvokes

オープン

#111,593 opened on 2025/01/19

 (6 件のコメント) (3 件のリアクション) (0 人の担当者)C# (5,445 件のフォーク)batch import
area-Interop-coreclrcode-analyzerhelp wanted

Repository metrics

Stars
 (17,886 個のスター)
PR merge metrics
 (平均マージ 12d 11h) (30d で 661 merged PRs)

説明

The current LibraryImport analyzer always suggests to convert to it from DllImport, even when it's not necessary due to the signature being blittable. This is especially annoying when multitargeting with older TFMs without LibraryImport. As discussed on Discord, there should be an option to opt out of this with an editorconfig switch.

cc @jkoritzinsky @tannergooding

コントリビューターガイド