Skip to content

Commit 55b4419

Browse files
Added meaning of each schema element
- Added schema storage information. - Added meaning of each schema element. - Added pointers to sample ruleset files generated from this schema.
1 parent 0888307 commit 55b4419

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

‎docs/code-quality/using-rule-sets-to-specify-the-cpp-rules-to-run.md‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ The following example shows a basic rule set file that you can use as a starting
104104
::: moniker-end
105105

106106
## 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).
108108

109109
```xml
110110
<?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
226226
</xs:schema>
227227

228228
```
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

Comments
 (0)