roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

RCS0056 Line to long is not detected for concatenated strings

Open Sonic198 opened this issue 1 year ago • 0 comments

Product and Version Used:

  <ItemGroup>
    <PackageReference Include="Roslynator.Analyzers" Version="4.5.0">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.5.0">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
  </ItemGroup>

Steps to Reproduce: Create variable with string concatenation in multiple lines. Please note that + sign is in the new line. Problem appears only in Visual Studio.

string test = 
    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    + "aaaaaaaaaaaaaaaaaaaaa";

Actual Behavior: RCS0056 is not detected

Expected Behavior: RCS0056 should be detected

Sonic198 avatar Oct 04 '23 21:10 Sonic198