Bug Report T566355
Visible to All Users

Static Code Analysis - CRR0026 shouldn't be shown for event handler parameters

created 7 years ago

As already explained, I've recently started properly using CodeRush for Roslyn and have started encountering edge cases, or cases whereby I wouldn't expect them to be flagged. In this particular case it is an event handler but that is attached elsewhere within the code (doesn't contain a handles statement at the end):

Visual Basic
Private Async Sub TimelineMenuRouteItemClick(ByVal sender As Object, ByVal e As EventArgs)

Would you expect this to be flagged that the e parameter is never used (it follows the event handler signature)?

Show previous comments (6)

    Of course Alex

    WB WB
    William Besancenez 7 years ago

      Hopefully this is being fixed but I wanted to show what I am experiencing. I'm getting CRR0026 when a "Handles" clause is included:

      Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      End Sub

      Both "sender" and "e" are tagged as not used and offers to delete them.

      In the case of "Handles", "Implements" or "Overrides", there should be no warning generated. These parameters must be there and cannot be deleted.

      DevExpress Support Team 7 years ago

        Hi William,

        Thank you for pointing out this issue. We were informed that this issue appears in the 17.2.4 version and have solved it. Please install the following hotfix and let us know whether it solves the issue on your side: DevExpress.CodeRush.Roslyn-17.2.4.17352.vsix.

        Answers approved by DevExpress Support

        created 7 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Comments (2)
          WH WH
          wolfgang hauer 7 years ago

            In 17.2.4 the problem occours on some forms in vb.net all with a handles clause

            AE AE
            Alex Eg (DevExpress) 7 years ago

              Hi Wolfgang,
              I have reproduced the issue, please give us some time to research it.

              Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

              Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.