Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-4004

Extend QuickFixHelper with nextVariable and previousVariable

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.3
    • Component/s: None
    • Labels:

      Description

      A number of quick fixes added to our checks require knowledge of the tokens surrounding a tree to edit.
      In the case of a variable declared as part of the multi-variable declaration, there is no obvious concise manner to retrieve information about the previous or next variable.
      In order to avoid repeating this bit of code in several places, the code present in checks such as UnusedLocalVariableCheck (see followingVariable and precedingVariable) should be extracted to QuickFixHelper.

        Attachments

          Activity

            People

            Assignee:
            dorian.burihabwa Dorian Burihabwa
            Reporter:
            dorian.burihabwa Dorian Burihabwa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: