コードインスペクション: 空の拡張機能ブロック
このインスペクションは、リファクタリングやクリーンアップ後に残る可能性のある空の 拡張ブロックを報告します。 例えば:
public static class StringExtensions
{
extension(string str)
{
public bool IsNullOrEmpty() => string.IsNullOrEmpty(str);
public bool IsNullOrWhiteSpace() => string.IsNullOrWhiteSpace(str);
}
extension (char[] chars)
{
}
}
public static class StringExtensions
{
extension(string str)
{
public bool IsNullOrEmpty() => string.IsNullOrEmpty(str);
public bool IsNullOrWhiteSpace() => string.IsNullOrWhiteSpace(str);
}
}
2026 年 6 月 12 日