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 S1144: Do not keep references to all type symbols #2204

Merged
merged 1 commit into from
Jan 4, 2019

Conversation

valhristov
Copy link
Contributor

@valhristov valhristov commented Jan 3, 2019

Fix #2203, Fix #2154

Note

I did not go with the additional optimizations because reporting for property accessors would become much more difficult.

@ghost ghost assigned valhristov Jan 3, 2019
@ghost ghost added the Status: Needs Review label Jan 3, 2019
{
Verifier.VerifyCSharpAnalyzer(@"
[assembly: System.Reflection.AssemblyCompany(Foo.Constants.AppCompany)]
public static class Foo
{
internal static class Constants // Noncompliant, False Positive; we cannot detect usages from assembly level attributes.
internal static class Constants // Compliant, detect usages from assembly level attributes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can now detect internal members used in assembly-level attributes because in the second pass we analyze all whole syntax trees in the compilation, not just the class declarations

@Evangelink Evangelink merged commit 9831259 into master Jan 4, 2019
@Evangelink Evangelink deleted the val/s1144-fix branch January 4, 2019 08:41
@ghost ghost removed the Status: Needs Review label Jan 4, 2019
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