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

Fix S3962: Ignore public/protected static readonly fields #609

Closed
wants to merge 2 commits into from
Closed

Fix S3962: Ignore public/protected static readonly fields #609

wants to merge 2 commits into from

Conversation

sl-williamdiesny
Copy link
Contributor

@sl-williamdiesny sl-williamdiesny commented Jul 27, 2017

Fix #607

@@ -97,6 +97,7 @@ private static bool IsFieldRelevant(IFieldSymbol fieldSymbol)
return fieldSymbol != null &&
fieldSymbol.IsStatic &&
fieldSymbol.IsReadOnly &&
fieldSymbol.GetEffectiveAccessibility() != Accessibility.Public &&
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest to use fieldSymbol.IsPubliclyAccessible() here instead because I assume the problem is the same for protected constants.

@Evangelink Evangelink changed the title S3962 - Ignore public static readonly fields Fix S3962: Ignore public/protected static readonly fields Jul 31, 2017
@Evangelink Evangelink self-assigned this Jul 31, 2017
@Evangelink
Copy link
Contributor

Please see #624. We need to create a branch ourselves to allow the QA scripts to execute.

@Evangelink Evangelink closed this Jul 31, 2017
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.

2 participants