Exemple #1
0
        public void ApplyTo(AnalyzerSettings settings)
        {
            settings.Reset();

            VisualStudioSettings.ApplyTo(settings);

            if (UseConfigFile)
            {
                ConfigFileSettings?.ApplyTo(settings);
            }
        }
Exemple #2
0
        public void ApplyTo(AnalyzerSettings analyzerSettings)
        {
            analyzerSettings.Reset();

            Apply(VisualStudioSettings);

            if (UseConfigFile)
            {
                Apply(ConfigFileSettings);
            }

            void Apply(Settings settings)
            {
                if (settings != null)
                {
                    foreach (string id in settings.GlobalSuppressions)
                    {
                        analyzerSettings.Disable(id);
                    }
                }
            }
        }