Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-238

C++ Rule: Unused "private" methods should be removed

    XMLWordPrintable

    Details

      Description

      Approach : by using a collection of all declared private functions and a collection of all used functions
      The steps are the following ones :

      • Each time a private function declaration is encountered, add a this element to a collection A
      • Based on the AST, each time a function is used, add this function name to a collection B
      • At the end of this analysis, find all the function names which are in A but not in B -> log an issue on those private function declarations

      Potential limite of this approach : the size of of the collection B might be important on big projects (to be checked)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alban.auzeill Alban Auzeill
              Reporter:
              freddy.mallet Freddy Mallet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: