Uploaded image for project: 'SonarFlex'
  1. SonarFlex
  2. SONARFLEX-52

Exception for (S1172) "Unused function parameters should be removed"

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Labels:
      None

      Description

      Ignore issue on function that defines an event handler. i.e ignores an issue on function which name contains "handler" and first argument is of type "*Event".
      Example:

      function clickHandler(event:MouseEvent):void {
         trace("click");
      }
      

      Feedback from user:

      "In Flex, event handlers must be defined with an event parameter. This event parameter is not necessarily used in the event handler. See http://www.adobe.com/devnet/actionscript/articles/event_handling_as3.html. That leads to "false positives" against flex:S1172 - Unused function parameters should be removed."

      See https://groups.google.com/forum/#!searchin/sonarqube/flex/sonarqube/T3p2LeBf_mI/owyAfD0C01YJ

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              elena.vilchik Elena Vilchik
              Reporter:
              linda.martin Linda Martin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: