Skip to content

Commit 5bdaf0a

Browse files
authored
Merge pull request #3842 from alexrp/patch-1
Update `stylecop.json` schema to have correct default for `headerDecoration`.
2 parents 17b613d + 9827fb3 commit 5bdaf0a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

StyleCop.Analyzers/StyleCop.Analyzers/Settings/ObjectModel/DocumentationSettings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ protected internal DocumentationSettings()
116116
{
117117
this.companyName = DefaultCompanyName;
118118
this.copyrightText = DefaultCopyrightText;
119-
this.headerDecoration = null;
119+
this.headerDecoration = string.Empty;
120120
this.variables = ImmutableDictionary<string, string>.Empty;
121121
this.xmlHeader = true;
122122

@@ -267,7 +267,7 @@ protected internal DocumentationSettings(JsonObject documentationSettingsObject,
267267
this.documentPrivateFields = documentPrivateFields.GetValueOrDefault(false);
268268
this.companyName = companyName ?? DefaultCompanyName;
269269
this.copyrightText = copyrightText ?? DefaultCopyrightText;
270-
this.headerDecoration = headerDecoration;
270+
this.headerDecoration = headerDecoration ?? string.Empty;
271271
this.variables = variables?.ToImmutable() ?? ImmutableDictionary<string, string>.Empty;
272272
this.xmlHeader = xmlHeader.GetValueOrDefault(true);
273273
this.fileNamingConvention = fileNamingConvention.GetValueOrDefault(FileNamingConvention.StyleCop);

StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
"headerDecoration": {
264264
"type": "string",
265265
"description": "The text used as decoration for the copyright header comment.",
266-
"default": null
266+
"default": ""
267267
},
268268
"fileNamingConvention": {
269269
"type": "string",

0 commit comments

Comments
 (0)