Mutagen-Modding / Mutagen.Bethesda.Analyzers

A project to diagnose and analyze the health of a mod or a load order
GNU General Public License v3.0
18 stars 5 forks source link

No IEnumerable in Format parameters #128

Closed Noggog closed 2 months ago

Noggog commented 2 months ago

TopicDefinition<IEnumerable<...>> should be TopicDefinition<IReadOnlyCollection<...>>

This is because we want to make sure that the variables passed in aren't being evaluated "lazily". By swapping to a collection, it's ensured that we're doing the looping eagerly

We should make some docs outlining this pattern as well

Noggog commented 2 months ago

Handling this in #129