Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21848

CyclomaticComplexity/LineOfCodes always 0 if library contains enumeration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • vs-code-metrics-plugin
    • VM with Windows 7 (x64), used as Master and Build Jenkins, Visual Studio 2010, Metrics-Version: 10.0

      The codemetric displays CyclomaticComplexity/LineOfCodes always 0 if the checked library contains an enumeration with calculated CC/LoC = 0 (there are multiple lines of code in the enumeration), see attached image vsCodeMetrics_1.png.

      CodeMetrics calculation result in VS2010 shows the same values for the ExampleEnum, but the CC/LoC at upper levels shows a value != 0, see image vsMetrics_1.png.

      Level 1: checked .dll
      Level 2: namespace
      Level 3: classes/enums

      Example Enum:
      /// <summary>...</summary>
      public enum ExampleEnum

      { A, B }

        1. vsCodeMetrics_1.png
          40 kB
          Kris P
        2. vsMetrics_1.png
          10 kB
          Kris P

            Unassigned Unassigned
            kp_k_m Kris P
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: