Update needed in rule RSPEC-1121 (Assignments should not be made from within sub-expression)

Version: SonarQube
Deployed in: Docker
Trying to use C# ‘with’ expression of ‘record’ type, this feature is released with c# version 9 in November 2020, but the SonarQube rule RSPEC-1121 (Assignments should not be made from within sub-expression) is last modified in 2019. Due to this the SonarQube rule RSPEC-1121 is complaining the following code

Person jim = joe with { Name = “Jim” };

refer the following blog for more information about csharp record type Using Record Types in C#


Welcome to the community!

Please check your SonarQube page footer and let us know what version you’re using.


Hi Ann,

The version I see is 8.9.8 (build 54436)


Hi Ramesh,

Thanks for checking! Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.9.8 → 9.9 → 10.1 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

Once you’ve updated, it’s quite likely the rule error you’re seeing will go away. If not, please do come back to us.


Thank you Ann for the quick response.