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
Copy file name to clipboardExpand all lines: documentation/Configuration.md
+41-41Lines changed: 41 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,11 +59,11 @@ properties are configured in the `indentation` object, which is shown in the fol
59
59
60
60
The following properties are used to configure basic indentation in StyleCop Analyzers.
61
61
62
-
| Property | Default Value | Summary |
63
-
| --- | --- | --- |
64
-
|`indentationSize`|**4**| The number of columns to use for each indentation of code. Depending on the `useTabs` and `tabSize` settings, this will be filled with tabs and/or spaces. |
65
-
|`tabSize`|**4**| The width of a hard tab character in source code. This value is used when converting between tabs and spaces. |
66
-
|`useTabs`|**false**|**true** to indent using hard tabs; otherwise, **false** to indent using spaces |
62
+
| Property | Default Value |Minimum Version |Summary |
63
+
| --- | --- | --- | --- |
64
+
|`indentationSize`|**4**|1.1.0 |The number of columns to use for each indentation of code. Depending on the `useTabs` and `tabSize` settings, this will be filled with tabs and/or spaces. |
65
+
|`tabSize`|**4**|1.1.0 |The width of a hard tab character in source code. This value is used when converting between tabs and spaces. |
66
+
|`useTabs`|**false**|1.1.0 |**true** to indent using hard tabs; otherwise, **false** to indent using spaces |
67
67
68
68
> :bulb: When working in Visual Studio, the IDE will not automatically adjust editor settings according to the values in
69
69
> **stylecop.json**. To provide this functionality as well, we recommend duplicating the basic indentation settings in a
@@ -117,9 +117,9 @@ This section describes the features of ordering rules which can be configured in
117
117
118
118
The following properties are used to configure element ordering in StyleCop Analyzers.
119
119
120
-
| Property | Default Value | Summary |
121
-
| --- | --- | --- |
122
-
|`elementOrder`|`[ "kind", "accessibility", "constant", "static", "readonly" ]`| Specifies the traits used for ordering elements within a document, along with their precedence |
120
+
| Property | Default Value |Minimum Version |Summary |
121
+
| --- | --- | --- | --- |
122
+
|`elementOrder`|`[ "kind", "accessibility", "constant", "static", "readonly" ]`|1.0.0 |Specifies the traits used for ordering elements within a document, along with their precedence |
123
123
124
124
The `elementOrder` property is an array of element traits. The ordering rules (SA1201, SA1202, SA1203, SA1204, SA1214,
125
125
and SA1215) evaluate these traits in the order they are defined to identify ordering problems, and the code fix uses
@@ -180,11 +180,11 @@ rules remain enforced.
180
180
181
181
The following properties are used to configure using directives in StyleCop Analyzers.
182
182
183
-
| Property | Default Value | Summary |
184
-
| --- | --- | --- |
185
-
|`systemUsingDirectivesFirst`| true | Specifies whether `System` using directives are placed before other using directives |
186
-
|`usingDirectivesPlacement`|`"insideNamespace"`| Specifies the desired placement of using directives |
187
-
|`blankLinesBetweenUsingGroups`|`"allow"`| Specifies is blank lines are required to separate groups of using statements |
183
+
| Property | Default Value |Minimum Version |Summary |
184
+
| --- | --- | --- | --- |
185
+
|`systemUsingDirectivesFirst`| true |1.0.0 |Specifies whether `System` using directives are placed before other using directives |
186
+
|`usingDirectivesPlacement`|`"insideNamespace"`|1.0.0 |Specifies the desired placement of using directives |
187
+
|`blankLinesBetweenUsingGroups`|`"allow"`|1.1.0 |Specifies is blank lines are required to separate groups of using statements |
188
188
189
189
#### Using Directives Placement
190
190
@@ -278,10 +278,10 @@ This section describes the features of naming rules which can be configured in *
278
278
279
279
The following properties are used to configure allowable Hungarian notation prefixes in StyleCop Analyzers.
280
280
281
-
| Property | Default Value | Summary |
282
-
| --- | --- | --- |
283
-
|`allowCommonHungarianPrefixes`|**true**| Specifies whether common non-Hungarian notation prefixes should be allowed. When true, the two-letter words 'as', 'at', 'by', 'do', 'go', 'if', 'in', 'is', 'it', 'no', 'of', 'on', 'or', and 'to' are allowed to appear as prefixes for variable names. |
284
-
|`allowedHungarianPrefixes`|`[ ]`| Specifies additional prefixes which are allowed to be used in variable names. See the example below for more information. |
281
+
| Property | Default Value |Minimum Version |Summary |
282
+
| --- | --- | --- | --- |
283
+
|`allowCommonHungarianPrefixes`|**true**|1.0.0 |Specifies whether common non-Hungarian notation prefixes should be allowed. When true, the two-letter words 'as', 'at', 'by', 'do', 'go', 'if', 'in', 'is', 'it', 'no', 'of', 'on', 'or', and 'to' are allowed to appear as prefixes for variable names. |
284
+
|`allowedHungarianPrefixes`|`[ ]`|1.0.0 |Specifies additional prefixes which are allowed to be used in variable names. See the example below for more information. |
285
285
286
286
The following example shows a settings file which allows the common prefixes as well as the custom prefixes 'md' and 'cd'.
287
287
@@ -313,9 +313,9 @@ This section describes the features of maintainability rules which can be config
313
313
314
314
The following properties are used to configure maintainability rules in StyleCop Analyzers.
315
315
316
-
| Property | Default Value | Summary |
317
-
| --- | --- | --- |
318
-
|`topLevelTypes`|`[ "class" ]`| Specifies which kind of types that must be placed in separate files |
316
+
| Property | Default Value |Minimum Version |Summary |
317
+
| --- | --- | --- | --- |
318
+
|`topLevelTypes`|`[ "class" ]`|1.1.0 |Specifies which kind of types that must be placed in separate files |
319
319
320
320
The `topLevelTypes` property is an array which specifies which kind of types that must be placed in separate files
321
321
according to rule SA1402. The following types are supported:
@@ -340,10 +340,10 @@ This section describes the features of layout rules which can be configured in *
340
340
341
341
The following properties are used to configure layout rules in StyleCop Analyzers.
342
342
343
-
| Property | Default Value | Summary |
344
-
| --- | --- | --- |
345
-
|`newlineAtEndOfFile`|`"allow"`| Specifies the handling for newline characters which appear at the end of a file |
346
-
|`allowConsecutiveUsings`|`true`| Specifies if SA1519 will allow consecutive using statements without braces |
343
+
| Property | Default Value |Minimum Version |Summary |
344
+
| --- | --- | --- | --- |
345
+
|`newlineAtEndOfFile`|`"allow"`|1.0.0 |Specifies the handling for newline characters which appear at the end of a file |
346
+
|`allowConsecutiveUsings`|`true`|1.1.0 |Specifies if SA1519 will allow consecutive using statements without braces |
347
347
348
348
### Lines at End of File
349
349
@@ -382,13 +382,13 @@ This section describes the features of documentation rules which can be configur
382
382
383
383
The following properties are used to configure copyright headers in StyleCop Analyzers.
384
384
385
-
| Property | Default Value | Summary |
386
-
| --- | --- | --- |
387
-
|`companyName`|`"PlaceholderCompany"`| Specifies the company name which should appear in copyright notices |
388
-
|`copyrightText`|`"Copyright (c) {companyName}. All rights reserved."`| Specifies the default copyright text which should appear in copyright headers |
389
-
|`xmlHeader`|**true**| Specifies whether file headers should use standard StyleCop XML format, where the copyright notice is wrapped in a `<copyright>` element |
390
-
|`variables`| n/a | Specifies replacement variables which can be referenced in the `copyrightText` value |
391
-
|`headerDecoration`| n/a | This value can be set to add a decoration for the header comment so headers look similar to the ones generated by the StyleCop Classic ReSharper fix |
385
+
| Property | Default Value |Minimum Version |Summary |
386
+
| --- | --- | --- | --- |
387
+
|`companyName`|`"PlaceholderCompany"`|1.0.0 |Specifies the company name which should appear in copyright notices |
388
+
|`copyrightText`|`"Copyright (c) {companyName}. All rights reserved."`|1.0.0 |Specifies the default copyright text which should appear in copyright headers |
389
+
|`xmlHeader`|**true**|1.0.0 |Specifies whether file headers should use standard StyleCop XML format, where the copyright notice is wrapped in a `<copyright>` element |
390
+
|`variables`| n/a |1.0.0 |Specifies replacement variables which can be referenced in the `copyrightText` value |
391
+
|`headerDecoration`| n/a |1.1.0 |This value can be set to add a decoration for the header comment so headers look similar to the ones generated by the StyleCop Classic ReSharper fix |
392
392
393
393
#### Configuring Copyright Text
394
394
@@ -488,13 +488,13 @@ With the above configuration, the fix for a file **TypeName.cs** would look like
488
488
489
489
StyleCop Analyzers includes rules which require developers to document the majority of a code base by default. This requirement can easily overwhelm a team which did not use StyleCop for the entire development process. To help guide developers towards a properly documented code base, several properties are available in **stylecop.json** to progressively increase the documentation requirements.
490
490
491
-
| Property | Default Value | Summary |
492
-
| --- | --- | --- |
493
-
|`documentInterfaces`|**true**| Specifies whether interface members need to be documented. When true, all interface members require documentation, regardless of accessibility. |
494
-
|`documentExposedElements`|**true**| Specifies whether exposed elements need to be documented. When true, all publicly-exposed types and members require documentation. |
495
-
|`documentInternalElements`|**true**| Specifies whether internal elements need to be documented. When true, all internally-exposed types and members require documentation. |
496
-
|`documentPrivateElements`|**false**| Specifies whether private elements need to be documented. When true, all types and members except for declared private fields require documentation. |
497
-
|`documentPrivateFields`|**false**| Specifies whether private fields need to be documented. When true, all fields require documentation, regardless of accessibility. |
491
+
| Property | Default Value |Minimum Version |Summary |
492
+
| --- | --- | --- | --- |
493
+
|`documentInterfaces`|**true**|1.0.0 |Specifies whether interface members need to be documented. When true, all interface members require documentation, regardless of accessibility. |
494
+
|`documentExposedElements`|**true**|1.0.0 |Specifies whether exposed elements need to be documented. When true, all publicly-exposed types and members require documentation. |
495
+
|`documentInternalElements`|**true**|1.0.0 |Specifies whether internal elements need to be documented. When true, all internally-exposed types and members require documentation. |
496
+
|`documentPrivateElements`|**false**|1.0.0 |Specifies whether private elements need to be documented. When true, all types and members except for declared private fields require documentation. |
497
+
|`documentPrivateFields`|**false**|1.0.0 |Specifies whether private fields need to be documented. When true, all fields require documentation, regardless of accessibility. |
498
498
499
499
These properties affect the behavior of the following rules which report missing documentation. Rules which report incorrect or incomplete documentation continue to apply to all documentation comments in the code.
500
500
@@ -522,9 +522,9 @@ The following example shows a configuration file which requires developers to do
522
522
523
523
Some documentation rules require summary texts to start with specific strings. To allow teams to document their code in their native language, **stylecop.json** contains the `documentationCulture` property.
524
524
525
-
| Property | Default Value | Summary |
526
-
| --- | --- | --- |
527
-
|`documentationCulture`|`"en-US"`| Specifies the culture or language to be used for certain documentation texts. |
525
+
| Property | Default Value |Minimum Version |Summary |
526
+
| --- | --- | --- | --- |
527
+
|`documentationCulture`|`"en-US"`| 1.1.0 |Specifies the culture or language to be used for certain documentation texts. |
528
528
529
529
This property affects the behavior of the following rules which report incorrect documentation.
0 commit comments