Skip to content

ObjectPoolLinter 1.4.0

Choose a tag to compare

@github-actions github-actions released this 17 Sep 01:15
· 15 commits to main since this release

Added

  • OPL002 reports explicit string building in hot paths:
    • string.Concat(...), every overload (two or more strings or objects, the params form, and
      IEnumerable<string>), as string.Concat();
    • string.Format(...), every overload including those taking an IFormatProvider, as
      string.Format();
    • StringBuilder.ToString() and StringBuilder.ToString(int, int), as StringBuilder.ToString().
      Reusing a StringBuilder avoids intermediate strings, but each ToString() still allocates the
      result.
  • The implicit params array built for a string.Concat or string.Format call, and the boxing of
    value-type arguments passed to one, are part of the call's allocation and are not reported again.
    a + b, which compiles to string.Concat, is still reported once as string concatenation.
  • 5 tests, for 139 in total.

Changed

  • The OPL002 descriptor description, docs/rules/OPL002.md, the README and the
    Unity package README list the new constructs.