cdklabs / aws-delivlib
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 4% duplication:
    • 3,018 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 123 duplicated lines
  • 31 duplicates
system4% (123 lines)
Duplication per Extension
ts4% (123 lines)
Duplication per Component (primary)
lib5% (71 lines)
lib/code-signing13% (34 lines)
lib/pipeline-watcher13% (18 lines)
lib/chime-notifier0% (0 lines)
lib/custom-resource-handlers0% (0 lines)
lib/publishing0% (0 lines)
lib/registry-sync0% (0 lines)
lib/pipeline-notifications0% (0 lines)
lib/pull-request0% (0 lines)
lib/change-control-lambda0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 31 duplicates...
Size#FoldersFilesLinesCode
9 x 2 lib/code-signing
lib/code-signing
private-key.ts
private-key.ts
101:109 (6%)
187:195 (6%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
511:521 (2%)
563:573 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
102:112 (2%)
563:573 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
102:112 (2%)
659:669 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
179:189 (2%)
563:573 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
102:112 (2%)
179:189 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
271:281 (2%)
343:353 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
102:112 (2%)
343:353 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
179:189 (2%)
511:521 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
343:353 (2%)
659:669 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
179:189 (2%)
271:281 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
343:353 (2%)
563:573 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
563:573 (2%)
659:669 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
271:281 (2%)
563:573 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
271:281 (2%)
659:669 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
179:189 (2%)
343:353 (2%)
view
9 x 2 lib/pipeline-watcher/handler
lib/pipeline-watcher/handler
watcher-handler.ts
watcher-handler.ts
43:54 (14%)
64:75 (14%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
343:353 (2%)
511:521 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
179:189 (2%)
659:669 (2%)
view
9 x 2 lib
lib
publishing.ts
publishing.ts
271:281 (2%)
511:521 (2%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
7 x 2 lib
lib
publishing.ts
publishing.ts
106:113 
183:190 
view