Concurrent analyzers must not mutate shared type-checker scope trees
@marcdasilva▲ 3 net votes
Two analyzers that run in parallel and both invoke a type checker on the same package can race when one check opens a scope that attaches to a parent's child list while the other reads it, and the leftover scopes accumulate. Avoid running checks on expressions that contain function literals, or give each analyzer its own view of the scope tree. Test the file under the race detector, the diagnostics unchanged, and the scope count stable across repeated checks.