private ProblemCollection CheckSymbol([CanBeNull] ISymbol symbol)
        {
            if (symbol != null)
            {
                // When unable to load external annotations, the rule would likely report lots
                // of false positives. This is prevented by letting it throw here and report nothing.
                var analyzerFactory = new AnalyzerFactory(ExternalAnnotationsRegistry.GetCached(), appliesToItem);

                BaseAnalyzer analyzer = analyzerFactory.CreateFor(symbol);
                analyzer.Analyze(ReportProblem);
            }

            return Problems;
        }
        private ProblemCollection CheckSymbol([CanBeNull] ISymbol symbol)
        {
            if (symbol != null)
            {
                // When unable to load external annotations, the rule would likely report lots
                // of false positives. This is prevented by letting it throw here and report nothing.
                IExternalAnnotationsResolver resolver = ExternalAnnotationsResolver.GetCached();
                resolver.EnsureScanned();

                var analyzerFactory = new AnalyzerFactory(resolver, appliesToItem);

                BaseAnalyzer analyzer = analyzerFactory.CreateFor(symbol);
                analyzer.Analyze(ReportProblem);
            }

            return(Problems);
        }