You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 55b4419
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/code-quality/using-rule-sets-to-specify-the-cpp-rules-to-run.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ The following example shows a basic rule set file that you can use as a starting
104
104
::: moniker-end
105
105
106
106
## Ruleset schema
107
-
The ruleset schema below describes the XML schema you can use to author your own rulesets programmatically.
107
+
The ruleset schema below describes the XML schema of a ruleset file. It is stored in `%VSINSTALLDIR%\Team Tools\Static Analysis Tools\Schemas\RuleSet.xsd`. You can use it to author your own rulesets programmatically, and/or validate if your custom rulesets adhere to the right format. For more information, see [How to: Create an XML document based on an XSD schema](https://docs.microsoft.com/en-us/visualstudio/xml-tools/how-to-create-an-xml-document-based-on-an-xsd-schema?view=vs-2019).
108
108
109
109
```xml
110
110
<?xml version="1.0" encoding="utf-8"?>
@@ -226,3 +226,19 @@ The ruleset schema below describes the XML schema you can use to author your own
226
226
</xs:schema>
227
227
228
228
```
229
+
For the meaning of each schema element, see below.
230
+
231
+
- TLocalization: Localization information including name of the ruleset file, description of the ruleset file, name of the resource assembly containing the localized resource, and base name of the localized resource.
232
+
- TRuleHintPaths: File paths used as hints to search for ruleset files.
233
+
- TName: Name of the current ruleset file.
234
+
- TDescription: Description of the current ruleset file.
235
+
- TInclude: Path to an included ruleset with rule action.
236
+
- TIncludeAll: Rule action for all rules.
237
+
- TRule: Rule ID with rule action.
238
+
- TRules: Collection of one or more rules.
239
+
- TRuleSet: Ruleset file format consisting of localization information, rule hint paths, include all information, include information, rules information, name, description, and tools version information.
240
+
- TRuleAction: Enumeration describing a rule action such as an error, warning, info, hidden, or none.
241
+
- TIncludeAction: Enumeration describing a rule action such as an error, warning, info, hidden, none, or default.
242
+
- TIncludeAllAction: Enumeration describing a rule action such as an error, warning, info, or hidden.
243
+
244
+
To see an example of a ruleset, see [To create a rule set in a text editor](using-rule-sets-to-specify-the-cpp-rules-to-run#to-create-a-rule-set-in-a-text-editor), or any of the default rulesets stored in `%VSINSTALLDIR%\Team Tools\Static Analysis Tools\Rule Sets`.
0 commit comments