Skip to content

Pr/epc41 format method arguments#321

Merged
SergeyTeplyakov merged 1 commit into
masterfrom
pr/epc41-format-method-arguments
May 20, 2026
Merged

Pr/epc41 format method arguments#321
SergeyTeplyakov merged 1 commit into
masterfrom
pr/epc41-format-method-arguments

Conversation

@SergeyTeplyakov
Copy link
Copy Markdown
Owner

No description provided.

@SergeyTeplyakov SergeyTeplyakov force-pushed the pr/epc41-format-method-arguments branch 2 times, most recently from d42e817 to 14e8a90 Compare May 20, 2026 20:21
Introduces four new analyzers:

- EPC38 TaskEnumerableReEnumerationAnalyzer (Async): flags re-enumeration of IEnumerable<Task>, which silently restarts the task producer. Disabled by default.

- EPC39 QuadraticEnumerationAnalyzer (Performance): flags iterating the same enumerable inside a loop (O(N*M) walks). Disabled by default.

- EPC40 PrivateMethodMultipleEnumerationAnalyzer (Performance): flags private methods that enumerate an IEnumerable<T> parameter multiple times when a caller passes a deferred LINQ query. Disabled by default.

- EPC41 FormatMethodArgumentsAnalyzer (ErrorHandling): validates format-string placeholders against arguments for user-annotated formatting methods (configured via 'dotnet_diagnostic.EPC41.format_methods' in .editorconfig). Enabled by default as Warning.

Includes shared EnumerationMethods helper used by EPC38/39/40.
@SergeyTeplyakov SergeyTeplyakov force-pushed the pr/epc41-format-method-arguments branch from 14e8a90 to 9afb7e1 Compare May 20, 2026 20:44
@SergeyTeplyakov SergeyTeplyakov merged commit 2796f7e into master May 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant