-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 3100 - Changed SA1600 and tests to meet new documentInterfaces values #3140
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3140 +/- ##
=========================================
Coverage ? 97.11%
=========================================
Files ? 828
Lines ? 104096
Branches ? 3361
=========================================
Hits ? 101098
Misses ? 2104
Partials ? 894 |
@@ -66,7 +66,7 @@ public async Task TestPartialTypeWithoutDocumentationAsync(string typeKeyword) | |||
""settings"": {{ | |||
""documentationRules"": {{ | |||
""documentExposedElements"": false, | |||
""{interfaceSettingName}"": false | |||
""{interfaceSettingName}"": ""false"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 This shouldn't change. It should continue to allow false
and true
(unquoted) for compatibility purposes.
""{interfaceSettingName}"": ""false"" | |
""{interfaceSettingName}"": false |
@@ -100,7 +100,7 @@ public async Task TestPartialClassWithEmptyDocumentationAsync(string typeKeyword | |||
""settings"": {{ | |||
""documentationRules"": {{ | |||
""documentExposedElements"": false, | |||
""{interfaceSettingName}"": false | |||
""{interfaceSettingName}"": ""false"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
""{interfaceSettingName}"": ""false"" | |
""{interfaceSettingName}"": false |
@@ -140,7 +140,7 @@ public async Task TestPartialTypesWithMissingButNotRequiredDocumentationAsync(st | |||
""settings"": {{ | |||
""documentationRules"": {{ | |||
""documentExposedElements"": false, | |||
""{interfaceSettingName}"": false | |||
""{interfaceSettingName}"": ""false"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
""{interfaceSettingName}"": ""false"" | |
""{interfaceSettingName}"": false |
[InlineData("true")] | ||
[InlineData("false")] | ||
[InlineData("all")] | ||
[InlineData("none")] | ||
[InlineData("exposed")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[InlineData("true")] | |
[InlineData("false")] | |
[InlineData("all")] | |
[InlineData("none")] | |
[InlineData("exposed")] | |
[InlineData("true")] | |
[InlineData("false")] | |
[InlineData("\"all\"")] | |
[InlineData("\"none\"")] | |
[InlineData("\"exposed\"")] |
{{ | ||
""settings"": {{ | ||
""documentationRules"": {{ | ||
""documentInterfaces"": ""{value}"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
""documentInterfaces"": ""{value}"" | |
""documentInterfaces"": {value} |
@@ -75,7 +75,7 @@ internal class DocumentationSettings | |||
/// <summary> | |||
/// This is the backing field for the <see cref="DocumentInterfaces"/> property. | |||
/// </summary> | |||
private readonly bool documentInterfaces; | |||
private readonly string documentInterfaces; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Use a new enumeration for this field
"description": "Specifies whether interface members need to be documented. When true, all interface members require documentation, regardless of accessibility.", | ||
"default": true | ||
"default": "all" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"default": "all" | |
"default": "all", | |
"enum": [ | |
"all", | |
"exposed", | |
"none", | |
true, | |
false | |
] |
@@ -221,9 +221,9 @@ | |||
"default": false | |||
}, | |||
"documentInterfaces": { | |||
"type": "boolean", | |||
"type": "string", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"type": "string", | |
"type": [ "string", "boolean" ], |
Any progress with this issue? I see the suggested |
I'm looking through the older pull requests in this repo. Is this something that you will continue working on, @CPAM34? |
As specified in issue #3100, the documentInterfaces setting has been modified to allow the support the new range of acceptable values - "all"/"true", "exposed", and "none"/"false". Test cases and checks have also been modified to take into account the setting now being a string instead of a bool.