Hello,
Verbatim string literals is an exception on rule S2479 but mixed with string interpolation, rule is fired up.
Versions used
- SonarQube 7.9.1 Developer Edition
- SonarC# 8.0 (build 9566)
- SonarScanner MSBuild 4.7.1
- Azure DevOps Server 17.M153.3
Code sample
// Compliant
string testA = @"
asasdasd";
// Should be compliant
string testB = $@"asdasdasd
asasdasd{testA}asdasd
asdasd";
// Compliant
string testC = @"asdasdasdD
asasdasd{testA}asdasd
asdasd";
References
$ - string interpolation
@ - verbatim identifier
C# rule S2479
Could I provide anythings else to help with my issue ?
Thanks,
Alain