- Language & SDK: C# .NET 8.0.402
- Operating system: Windows 10
- Rider 2024.2.5
- SonarLint plugin version: 10.10.0.79575
- Is connected mode used: No
This is similar to S2629 false positive for logging string interpolation if the interpolated in are placeholder names.
This example shows that S2629 is giving a false positive:
const string FieldName = "FieldName";
logger.Log(LogLevel.Information, $"{nameof(Benchmarks)} " + //
$"{FieldName}:{{{FieldName}}}", value);
I have created the repo at https://github.com/delixfe/InterpolatedStringLowering.git.