microsoft / MSBuildLocator
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 16 units with 351 lines of code in units (56.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (99 lines of code)
    • 3 medium size units (111 lines of code)
    • 7 small units (113 lines of code)
    • 5 very small units (28 lines of code)
0% | 28% | 31% | 32% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 28% | 31% | 32% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/MSBuildLocator0% | 28% | 31% | 32% | 7%
Alternative Visuals
Longest Units
Top 16 longest units
Unit# linesMcCabe index# params
public static void RegisterMSBuildPath()
in src/MSBuildLocator/MSBuildLocator.cs
99 17 1
internal static IList GetInstances()
in src/MSBuildLocator/VisualStudioLocationHelper.cs
48 12 0
public static VisualStudioInstance GetInstance()
in src/MSBuildLocator/DotNetSdkLocationHelper.cs
42 12 1
internal VisualStudioInstance()
in src/MSBuildLocator/VisualStudioInstance.cs
21 5 4
public static void RegisterInstance()
in src/MSBuildLocator/MSBuildLocator.cs
20 4 1
private static bool IsMSBuildAssembly()
in src/MSBuildLocator/MSBuildLocator.cs
18 5 1
private static void ApplyDotNetSdkEnvironmentVariables()
in src/MSBuildLocator/MSBuildLocator.cs
16 2 1
private static IEnumerable GetInstances()
in src/MSBuildLocator/MSBuildLocator.cs
16 4 1
public static void Unregister()
in src/MSBuildLocator/MSBuildLocator.cs
15 2 0
private static ISetupConfiguration GetQuery()
in src/MSBuildLocator/VisualStudioLocationHelper.cs
15 3 0
public static VisualStudioInstance RegisterDefaults()
in src/MSBuildLocator/MSBuildLocator.cs
13 2 0
public static IEnumerable GetInstances()
in src/MSBuildLocator/DotNetSdkLocationHelper.cs
9 3 1
internal static IEnumerable QueryVisualStudioInstances()
in src/MSBuildLocator/MSBuildLocator.cs
6 1 2
public static IEnumerable QueryVisualStudioInstances()
in src/MSBuildLocator/MSBuildLocator.cs
5 1 1
public static IEnumerable QueryVisualStudioInstances()
in src/MSBuildLocator/MSBuildLocator.cs
4 1 0
public static void RegisterMSBuildPath()
in src/MSBuildLocator/MSBuildLocator.cs
4 1 1