Skip to content

Internal code usage scenarios missed by the analyzer #20206

Closed

Description

@ajcvickers

Identified scenarios:

  • Generic type parameter (e.g. context.GetService<IInMemoryStoreCache>())
  • Type usage without instantiation (IStateManager state = null)
  • Typeof (typeof(IInMemoryStoreCache))
  • private readonly field in private nested class
  • Implemented interface

Activity

  1. smitpatel commented on Mar 7, 2020

    @smitpatel
    Contributor

    May be because generic type check is missed?

  2. added this to the 5.0.0 milestone on Mar 9, 2020
  3. ajcvickers commented on Mar 29, 2020

    @ajcvickers
    ContributorAuthor

    Also doesn't seem to detect:

    IStateManager state = null;

    But does detect:

    IStateManager state = new StateManager(null);
  4. ajcvickers commented on Mar 29, 2020

    @ajcvickers
    ContributorAuthor

    Finding more cases like this. It seems that the analyzer doesn't detect any uses of internal types/members that don't actually involve invoking anything.

  5. changed the title [-]Internal code analyzer doesn't detect GetService of an internal service[/-] [+]Internal code usage scenarios missed by the analyzer[/+] on Apr 10, 2020
  6. roji commented on Apr 10, 2020

    @roji
    Member

    @ajcvickers have converted this issue to a shopping list of currently undetected cases in the analyzer. Let's add more to it as we find them.

  7. smitpatel commented on Apr 22, 2020

    @smitpatel
    Contributor

    private readonly field in private nested class.

  8. roji commented on Aug 8, 2020

    @roji
    Member

    @smitpatel can you provide a bit more detail on "private readonly field in private nested class", possibly a code fragment?

  9. changed the title [-]Internal code usage scenarios missed by the analyzer[/-] [+]Rewrite analyzer using Roslyn Operations for speed and cross-language support[/+] on Aug 8, 2020
  10. changed the title [-]Rewrite analyzer using Roslyn Operations for speed and cross-language support[/-] [+]Internal code usage scenarios missed by the analyzer[/+] on Aug 8, 2020
  11. added 3 commits that reference this issue on Aug 8, 2020
    e5b877e
    9314eb8
    cf3db52
  12. smitpatel commented on Aug 10, 2020

    @smitpatel
    Contributor
    public class A
    {
        private class B
        {
            private readonly InternalEntityEntry Entry;
        }
    }
    
  13. added a commit that references this issue on Aug 16, 2020
    bc68329
  14. modified the milestones: 5.0.0, on Aug 16, 2020
  15. modified the milestones: , 5.0.0 on Nov 7, 2020
  16. added theissue type on Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions