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

Code metrics should take into account method context filter in IDEA

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Low
    • open-source
    • None
    • CIJ Plugin
    • None
    • Severity 2 - Major

    Description

      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.

      Attachments

        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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: