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: StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -194,6 +194,11 @@
194
194
"description": "Determines whether the file header should be wrapped in the StyleCop-standard XML structure.",
195
195
"default": true
196
196
},
197
+
"headerDecoration": {
198
+
"type": "boolean",
199
+
"description": "The text used as decoration for the copyright header comment.",
200
+
"default": null
201
+
}
197
202
"fileNamingConvention": {
198
203
"type": "string",
199
204
"description": "Specifies the preferred naming convention for files. The default value \"stylecop\" uses the naming convention defined by StyleCop Classic, while \"metadata\" uses a file naming convention that matches the metadata names of types.",
Copy file name to clipboardExpand all lines: documentation/Configuration.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -324,6 +324,7 @@ The following properties are used to configure copyright headers in StyleCop Ana
324
324
|`copyrightText`|`"Copyright (c) {companyName}. All rights reserved."`| Specifies the default copyright text which should appear in copyright headers |
325
325
|`xmlHeader`|**true**| Specifies whether file headers should use standard StyleCop XML format, where the copyright notice is wrapped in a `<copyright>` element |
326
326
|`variables`| n/a | Specifies replacement variables which can be referenced in the `copyrightText` value |
327
+
|`headerDecoration`| n/a | This value can be set to add a decoration for the header comment so that the headers look similar to the ones generated by the StyleCop classic R# fix |
327
328
328
329
#### Configuring Copyright Text
329
330
@@ -373,6 +374,35 @@ When the `xmlHeader` property is explicitly set to **false**, StyleCop Analyzers
373
374
// {copyrightText}
374
375
```
375
376
377
+
#### Configuring Copyright Text Header Decoration
378
+
379
+
The `headerDecoration` property is a string which can contain a string that's used for decorating the generated header so that the headers look similar to the ones generated by the StyleCop classic R# fix.
380
+
381
+
The default value for the `headerDecoration` property is empty, so no decoration will be added.
382
+
> The header decoration is not checked, it's only used for fixing the header.
383
+
384
+
```json
385
+
{
386
+
"settings": {
387
+
"documentationRules": {
388
+
"companyName": "FooCorp",
389
+
"copyrightText": "Copyright (c) {companyName}. All rights reserved.",
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.
0 commit comments