CodeAnalysisRuleSettings.CreateFromSettingsString(String, IList<ExtensibilityError>) CodeAnalysisRuleSettings.CreateFromSettingsString(String, IList<ExtensibilityError>) CodeAnalysisRuleSettings.CreateFromSettingsString(String, IList<ExtensibilityError>) Method


Creates a CodeAnalysisRuleSettings configuration based on a settings string like the one used inside SSDT project files. This string defines what rules should be disabled or have their problems treated as errors instead of warnings. Any rule not included in the settings string will be enabled by default.

public static Microsoft.SqlServer.Dac.CodeAnalysis.CodeAnalysisRuleSettings CreateFromSettingsString (string settingsString, out System.Collections.Generic.IList<Microsoft.SqlServer.Dac.Extensibility.ExtensibilityError> errors);
static member CreateFromSettingsString : string *  -> Microsoft.SqlServer.Dac.CodeAnalysis.CodeAnalysisRuleSettings
Public Shared Function CreateFromSettingsString (settingsString As String, ByRef errors As IList(Of ExtensibilityError)) As CodeAnalysisRuleSettings


String String String

A semicolon delimited string identifying rules to be disabled or have problems treated as errors. The format is "-My.Disabled.Rule;+!My.Enabled.RuleWithError;-!My.Disabled.RuleWithError". Hence disabled rules should have "-" before their ID and enabled rules with errors should have "+!" before their ID. Only rules that are to be disabled or have their problems treated as errors should be included in the settings string.

If this parameter is null or contains no valid rules, a default empty configuration will be returned. This will result in all discovered rules being run.


List of errors found when processing the list.


Applies to