aws / lightsailctl
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 23 units with 338 lines of code in units (71.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (220 lines of code)
    • 4 small units (55 lines of code)
    • 11 very small units (63 lines of code)
0% | 0% | 65% | 16% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 0% | 65% | 16% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
internal/plugin0% | 0% | 92% | 0% | 8%
internal/cs0% | 0% | 55% | 17% | 27%
internal0% | 0% | 43% | 32% | 24%
ROOT0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in internal/plugin/plugin.go
39 8 1
func PushImage()
in internal/cs/pushimage.go
31 5 4
func Main()
in internal/plugin/plugin.go
30 7 2
func skipStatuses()
in internal/cs/dockerengine.go
27 7 2
func invokeOperation()
in internal/plugin/plugin.go
25 6 3
func()
in internal/cs/dockerengine.go
24 5 1
func getLatestLightsailctlVersion()
in internal/updatecheck.go
23 6 2
func parsePushContainerImagePayload()
in internal/plugin/plugin.go
21 4 1
func CheckForUpdates()
in internal/updatecheck.go
17 3 4
func getServiceRegistryAuth()
in internal/cs/pushimage.go
14 2 2
func main()
in main.go
13 5 0
func randomName13()
in internal/cs/pushimage.go
11 3 0
func parseInput()
in internal/plugin/plugin.go
10 4 1
func extractDigest()
in internal/cs/dockerengine.go
10 2 1
func NewDockerEngine()
in internal/cs/dockerengine.go
8 2 1
func()
in internal/version.go
7 3 1
func generateUniqueTag()
in internal/cs/pushimage.go
7 2 0
func tryUntagImage()
in internal/cs/pushimage.go
5 2 3
func()
in internal/cs/dockerengine.go
4 1 1
func()
in internal/version.go
3 1 1