Sonar version: Version 9.3 (build 51899)
I do not think rule S1643 (strings should not be concatenated using '+' in a loop) should be applied when the loop is not used to aggregate strings.
Consider this example:
class MyObject
{
public string Name { get; set; }
public bool Enabled { get; set; }
}
void MarkDisabled(IList<MyObject> objects)
{
foreach (var obj in objects)
{
if (!obj.Enabled)
obj.Name += " - DISABLED";
}
}
This alters a string field of a specific object and does not aggregate the results.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4