You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the author of an assembly/NuGet that provides several extensions for a myriad of use cases, I'd like to annotate those who are subject for "multiple enumeration". Currently this is only possible via editorconfig-Options, which cannot be merged/appended, only ever overwritten. Which would make the user to have to add all signatures manually (also every time in the event of a change)
Describe suggestions on how to achieve the rule
Add Atttributes for Methods/Parameters, that would put them in the same list as enumeration_methods and linq_chain_methods, or the already hardcoded Linq-Extensions.
For backporting reasons, the analyzer should expect the Attribute (via FullName) to exist in multiple Assemblies. (aka compilation.GetTypesByMetadataName(...) (plural)) (Because the Analyzer-NuGet should not be a Runtime-Dependency)
Additional context
Using assume_method_enumerates_parameters = true does produce too many false positives, where it's not worth to suppress all.
The text was updated successfully, but these errors were encountered:
Analyzer
"Possible multiple enumerations of IEnumerable collection"
Diagnostic ID: CA1851
Describe the improvement
https://github.com/dotnet/roslyn-analyzers/blob/main/docs/Analyzer%20Configuration.md#enumeration-methods
As the author of an assembly/NuGet that provides several extensions for a myriad of use cases, I'd like to annotate those who are subject for "multiple enumeration". Currently this is only possible via editorconfig-Options, which cannot be merged/appended, only ever overwritten. Which would make the user to have to add all signatures manually (also every time in the event of a change)
Describe suggestions on how to achieve the rule
Add Atttributes for Methods/Parameters, that would put them in the same list as
enumeration_methods
andlinq_chain_methods
, or the already hardcoded Linq-Extensions.For backporting reasons, the analyzer should expect the Attribute (via FullName) to exist in multiple Assemblies. (aka
compilation.GetTypesByMetadataName(...)
(plural)) (Because the Analyzer-NuGet should not be a Runtime-Dependency)Additional context
Using
assume_method_enumerates_parameters = true
does produce too many false positives, where it's not worth to suppress all.The text was updated successfully, but these errors were encountered: