Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1785

Extend database format to handle statements and methods in a file

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Allow better modelling of file-level statements and methods so that we can better support languages like Ruby which support top-level scripting constructs.

      Example:

      session.enterFile(..);
      session.enterMethod(...); // top-level-method, not inside a class
      ...
      // some statements
      ...
      session.exitMethod();
      ...
      session.addStatement(...); // top-level-statement, not inside a class or a method
      ...
      session.exitFile();
      

      Some preparation have been already done for Java 8 (Clover 3.2).

      Things to be checked:

      • how our code calculates the start/end line/col range for a statement/method outside a class
      • how it calculates code metrics for a file having top-level statements/methods
      • how it handles exclusion filters (statement/method regexp)
      • how it handles nested entities (method-in-method etc)

      Things to be implemented:

      • take into account these top-level statements/methods in reporting
        • show in XML / HTML / PDF / JSON
        • render lines
        • show in tables etc

      Out of scope:

      • test optimization

      Note:
      Looking at how Clojure is written, for any Clojure file there would only ever be one FileInfo containing lots of StatementInfos and MethodInfos but no ClassInfos.

            [CLOV-1785] Extend database format to handle statements and methods in a file

            Katherine Yabut made changes -
            Workflow Original: JAC Suggestion Workflow [ 3342040 ] New: JAC Suggestion Workflow 3 [ 3584611 ]
            Status Original: RESOLVED [ 5 ] New: Closed [ 6 ]
            Monique Khairuliana (Inactive) made changes -
            Epic Link Original: CLOV-1737 [ 431986 ]
            Michael Andreacchio made changes -
            Workflow Original: New Clover Workflow [ 955635 ] New: JAC Suggestion Workflow [ 3342040 ]
            Issue Type Original: Improvement [ 4 ] New: Suggestion [ 10000 ]
            Status Original: Closed [ 6 ] New: Resolved [ 5 ]
            Michael Andreacchio made changes -
            Resolution New: Won't Fix [ 2 ]
            Status Original: Open [ 1 ] New: Closed [ 6 ]
            Marek Parfianowicz made changes -
            Assignee Original: Marek Parfianowicz [ mparfianowicz ]
            Marek Parfianowicz made changes -
            Rank New: Ranked higher
            Marek Parfianowicz made changes -
            Sprint Original: 5.0.0 Sprint 1 [ 2601 ]
            Marek Parfianowicz made changes -
            Fix Version/s New: 4.2.0 [ 56395 ]
            Fix Version/s Original: 5.0.0 [ 37518 ]
            Grzegorz Lewandowski made changes -
            Rank New: Ranked higher
            Grzegorz Lewandowski made changes -
            Sprint Original: 5.0.0 Sprint 2 [ 2603 ] New: 5.0.0 Sprint 1 [ 2601 ]

              Unassigned Unassigned
              mparfianowicz Marek Parfianowicz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 5m
                  5m
                  Remaining:
                  Remaining Estimate - 5m
                  5m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified