7d2ffd78de
This change makes sense to me for a couple of reasons. First, when editing a correction producer the information about whether it can be bulk applied will be easier to find. Second, the information doesn't need to be duplicated when the producer can be applied to multiple error codes. And third, because the information is in one place we can't enable a producer in one place and miss enabling it in other places. This does have the unfortunate consequence that an extra producer needs to be created for bulk application in order to determine whether it should be applied at all, and can't be re-used because producers maintain state. We could consider storing a 'generator' object rather than a generator function in the map and have the `newInstance` methods produce those objects, but I'm not convinced that it's worthwhile given how short lived the extra producer is. There was also one subtle change that you probably won't see by looking at the changes, which is that one of the producers was enabled for bulk application for a lint but not enabled for several non-lint cases. It is now enabled everywhere. I remember thinking at the time that it should be fine, but I've forgotten which producer it was, so I can't easily tell you. If you want to confirm that change I'll be happy to do the work of figuring out which producer it is and which error codes were impacted by the change. Change-Id: I2010d777f727472c0d307a6948b84d37491e2b17 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202600 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>