SqlCodeAnalysisRule Class

Definition

Base class for SQL static code analysis rules. An analysis rule analyzes a model / model element and returns a list of problems found during analysis.

Implementing classes must have a ExportCodeAnalysisRuleAttribute defined on the class definition to be discovered and used during code analysis.

C#
public abstract class SqlCodeAnalysisRule : Microsoft.SqlServer.Dac.CodeAnalysis.SqlAnalysisRule
Inheritance
SqlCodeAnalysisRule

Constructors

Properties

SupportedElementTypes

Types of elements checked by this rule. Required if the rule scope is Element, for Model scoped rules this is not relevant

(Inherited from SqlAnalysisRule)

Methods

Analyze(SqlRuleExecutionContext)

Performs analysis and returns a list of problems detected

(Inherited from SqlAnalysisRule)

Applies to

Product Versions
Microsoft.Data.Tools.Msbuild 10.0.61804.210