Code metrics should take into account method context filter in IDEA

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Low
    • open-source
    • Affects Version/s: None
    • Component/s: CIJ Plugin
    • None
    • Severity 2 - Major

      When a method context filter is configured in IDEA (e.g. ".toString."), a method is filtered-out in the source editor:

      However, it is not being filtered out in the project tree in the Cloverage view - code metric shows "1" instead of "0" for this method:

      Furthermore, when coverage data is being exported to the HTML report, even if the "use current filter settings" is enabled, it ignores the method context defined:

      At the same time, when an HTML report is generated from Maven, for instance, it applies the filter mostly correctly (mostly because it filters-out the most from a class complexity, but it could show "0" for a method itself too):

      Expected behaviour

      All methods excluded by the method context filter should affect code metrics.

        1. html_report_class_methods.png
          155 kB
          Marek Parfianowicz
        2. html_report_with_filter.png
          67 kB
          Marek Parfianowicz
        3. html_report_without_filter.png
          65 kB
          Marek Parfianowicz
        4. method_context_filtered_in_source.png
          17 kB
          Marek Parfianowicz
        5. method_context_ignored_in_html_export.png
          118 kB
          Marek Parfianowicz
        6. method_context_ignored_in_metrics.png
          97 kB
          Marek Parfianowicz
        7. method_context_not_filtered_in_html_source.png
          28 kB
          Marek Parfianowicz

              Assignee:
              Unassigned
              Reporter:
              Marek Parfianowicz (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: