awslabs / fhir-works-on-aws-authz-smart
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 29 units with 623 lines of code in units (75.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (54 lines of code)
    • 12 medium size units (388 lines of code)
    • 8 small units (131 lines of code)
    • 8 very small units (50 lines of code)
0% | 8% | 62% | 21% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 8% | 62% | 21% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 8% | 62% | 21% | 8%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async verifyAccessToken()
in src/smartHandler.ts
54 12 1
50 13 1
function isRequestorReferenced()
in src/smartAuthorizationHelper.ts
45 11 4
async isBundleRequestAuthorized()
in src/smartHandler.ts
45 8 1
39 4 1
export async function introspectJwtToken()
in src/smartAuthorizationHelper.ts
36 5 4
export function decodeJwtToken()
in src/smartAuthorizationHelper.ts
30 10 3
28 10 4
27 7 1
25 6 8
export const SEARCH_OPERATIONS:()
in src/smartScopeHelper.ts
21 2 1
function getValidOperationsForScope()
in src/smartScopeHelper.ts
21 7 4
export function isScopeSufficient()
in src/smartScopeHelper.ts
21 2 6
export function hasReferenceToResource()
in src/smartAuthorizationHelper.ts
20 4 4
export async function verifyJwtToken()
in src/smartAuthorizationHelper.ts
20 3 4
throw Error()
in src/smartHandler.ts
19 2 1
async isWriteRequestAuthorized()
in src/smartHandler.ts
18 2 1
export function hasAccessToResource()
in src/smartAuthorizationHelper.ts
17 6 7
14 5 3
12 2 1