Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CPAM34
Copy link

@CPAM34 CPAM34 commented Apr 6, 2020

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.

@codecov
Copy link

codecov bot commented Apr 6, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@b6b9b02). Click here to learn what that means.
The diff coverage is 88.88%.

@@            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""
Copy link
Member

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.

Suggested change
""{interfaceSettingName}"": ""false""
""{interfaceSettingName}"": false

@@ -100,7 +100,7 @@ public async Task TestPartialClassWithEmptyDocumentationAsync(string typeKeyword
""settings"": {{
""documentationRules"": {{
""documentExposedElements"": false,
""{interfaceSettingName}"": false
""{interfaceSettingName}"": ""false""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
""{interfaceSettingName}"": ""false""
""{interfaceSettingName}"": false

@@ -140,7 +140,7 @@ public async Task TestPartialTypesWithMissingButNotRequiredDocumentationAsync(st
""settings"": {{
""documentationRules"": {{
""documentExposedElements"": false,
""{interfaceSettingName}"": false
""{interfaceSettingName}"": ""false""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
""{interfaceSettingName}"": ""false""
""{interfaceSettingName}"": false

Comment on lines +147 to +151
[InlineData("true")]
[InlineData("false")]
[InlineData("all")]
[InlineData("none")]
[InlineData("exposed")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[InlineData("true")]
[InlineData("false")]
[InlineData("all")]
[InlineData("none")]
[InlineData("exposed")]
[InlineData("true")]
[InlineData("false")]
[InlineData("\"all\"")]
[InlineData("\"none\"")]
[InlineData("\"exposed\"")]

{{
""settings"": {{
""documentationRules"": {{
""documentInterfaces"": ""{value}""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
""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;
Copy link
Member

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"default": "all"
"default": "all",
"enum": [
"all",
"exposed",
"none",
true,
false
]

@@ -221,9 +221,9 @@
"default": false
},
"documentInterfaces": {
"type": "boolean",
"type": "string",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"type": "string",
"type": [ "string", "boolean" ],

@ashahabov
Copy link

Any progress with this issue? I see the suggested exposed value for documentInterfaces is not applicable yet.

@bjornhellander
Copy link
Contributor

I'm looking through the older pull requests in this repo. Is this something that you will continue working on, @CPAM34?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants