code-buster 0.11.0

Repository-aware static analysis for AI-assisted development
Documentation
{
  "id": "cs-string-concat-loop",
  "language": "csharp",
  "group": "performance",
  "listingTitle": "Avoid C# string concatenation in loops",
  "title": "Avoid C# string concatenation in loops",
  "mvvm": false,
  "defaultSeverity": "warn",
  "legacyGroup": "performance",
  "why": "Repeated immutable string concatenation can copy a growing prefix and allocate temporary strings on every iteration.",
  "suggestion": "Accumulate with StringBuilder or collect fragments and join once after the loop.",
  "version": 6,
  "semanticMaturity": "token",
  "securityKind": "none",
  "taxonomy": [
    "performance"
  ],
  "requirements": [
    "sourceText"
  ],
  "packs": [
    "csharp"
  ],
  "implementation": "src/languages/csharp/rules.rs",
  "languages": [
    "csharp"
  ],
  "frameworks": [],
  "languageVersions": [],
  "limitations": [
    "Only explicitly typed string variables whose nearest declaration precedes a multiline loop and that use += or self-concatenation are reported.",
    "Bounded loops, compiler optimizations, variable shadowing, and alternative string-like types are not inferred."
  ]
}