NDepend.API Documentation
CodeRuleAttribute Class
Members 
NDepend.Attributes Namespace : CodeRuleAttribute Class
This attribute can be used to declare a code rule (or query) in your source code.
Syntax
[AttributeUsage(AttributeTargets.All, AllowMultiple=true)]
public sealed class CodeRuleAttribute : System.Attribute 
Remarks
The code rule is a CQLinq or CQL string.
It is extracted automatically from assemblies analyzed at analysis time.
A code rule gathered from a CodeRuleAttribute appears under a group named: "Rules extracted from Source Code".
Under this rule, code rules are grouped under the parent namespaces of code elements tagged by CodeRuleAttribute.
More information at Rules extracted from code
Inheritance Hierarchy

System.Object
   System.Attribute
      NDepend.Attributes.CodeRuleAttribute

Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

CodeRuleAttribute Members
NDepend.Attributes Namespace
HasAttribute Method
HasAttribute Method
AttributeClassesThatTagMe Property
IsExtractedFromCode Property