Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Fix analyzer [RCS0053](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0053) ([PR](https://github.com/dotnet/roslynator/pull/1518))
- Fix analyzer [RCS0056](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0056) ([PR](https://github.com/dotnet/roslynator/pull/1521))

## [4.12.5] - 2024-09-13

Expand Down
1 change: 1 addition & 0 deletions src/Formatting.Analyzers/CSharp/LineIsTooLongAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ private static void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context)
SyntaxKind.InterpolatedRawStringEndToken,
SyntaxKind.MultiLineRawStringLiteralToken,
#endif
SyntaxKind.InterpolatedStringTextToken,
SyntaxKind.InterpolatedStringEndToken))
{
SyntaxNode parent = token2.Parent;
Expand Down
18 changes: 18 additions & 0 deletions src/Tests/Formatting.Analyzers.Tests/RCS0056LineIsTooLongTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,24 @@ static void M(string x, int y)
0);
}
}
"""");
}

[Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.LineIsTooLong)]
public async Task TestNoDiagnostic_LongRawStringLiteral2()
{
await VerifyNoDiagnosticAsync(""""
class C
{
void M()
{
string x = "x";
var value = $$"""
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{{x}}
""";
}
}
"""");
}
}