Skip to content

CompilationEndAction not being called. #11750

Open

Description

The UseAutoProp analyzer looks like this:

        public sealed override void Initialize(AnalysisContext context)
        {
            context.RegisterCompilationStartAction(csac =>
            {
                var analysisResults = new ConcurrentBag<AnalysisResult>();
                var ineligibleFields = new ConcurrentBag<IFieldSymbol>();

                csac.RegisterSymbolAction(sac => AnalyzeProperty(analysisResults, sac), SymbolKind.Property);
                RegisterIneligibleFieldsAction(csac, ineligibleFields);

                csac.RegisterCompilationEndAction(cac => Process(analysisResults, ineligibleFields, cac));
            });
        }

Even though we call RegisterCompilationEndAction, the call to the registered lambda never happens.

This means that UseAutoProp doesn't actually work at all.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions