firebase / firebase-functions
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
  • 9% duplication:
    • 6,303 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 617 duplicated lines
  • 85 duplicates
system9% (617 lines)
Duplication per Extension
ts9% (524 lines)
js19% (66 lines)
yaml9% (27 lines)
Duplication per Component (primary)
src/v217% (241 lines)
src/common12% (74 lines)
src7% (69 lines)
spec/fixtures26% (66 lines)
src/providers4% (56 lines)
src/runtime42% (46 lines)
integration_test/functions5% (38 lines)
scripts/publish29% (27 lines)
scripts0% (0 lines)
scripts/publish-container0% (0 lines)
docgen/theme0% (0 lines)
docgen/content-sources0% (0 lines)
docgen0% (0 lines)
v20% (0 lines)
v2/alerts0% (0 lines)
logger0% (0 lines)
mocha0% (0 lines)
spec/v20% (0 lines)
spec/v10% (0 lines)
src/logger0% (0 lines)
src/utilities0% (0 lines)
v10% (0 lines)

Duplication Between Components (50+ lines)

G src/common src/common src/runtime src/runtime src/common--src/runtime 92 src src src/v2 src/v2 src--src/v2 78

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 85 duplicates...
Size#FoldersFilesLinesCode
46 x 2 src/common
src/runtime
manifest.ts
manifest.ts
26:84 (100%)
26:84 (100%)
view
14 x 2 spec/fixtures/sources/commonjs-grouped
spec/fixtures/sources/commonjs
index.js
index.js
1:18 (93%)
1:18 (100%)
view
14 x 2 spec/fixtures/sources/commonjs-main
spec/fixtures/sources/commonjs
functions.js
index.js
1:18 (100%)
1:18 (100%)
view
14 x 2 spec/fixtures/sources/commonjs-grouped
spec/fixtures/sources/commonjs-main
index.js
functions.js
1:18 (93%)
1:18 (100%)
view
13 x 2 src/v2/providers/alerts
src/v2/providers
alerts.ts
storage.ts
82:94 (16%)
350:363 (6%)
view
12 x 2 spec/fixtures/sources/esm-main
spec/fixtures/sources/esm
functions.js
index.js
4:18 (100%)
4:18 (100%)
view
11 x 2 src
src/v2
cloud-functions.ts
options.ts
633:643 (3%)
314:324 (6%)
view
11 x 2 src
src/v2
cloud-functions.ts
options.ts
580:590 (3%)
314:324 (6%)
view
11 x 2 src/v2/providers
src/v2/providers
pubsub.ts
storage.ts
164:175 (9%)
350:361 (5%)
view
11 x 2 src/v2/providers/alerts
src/v2/providers/alerts
appDistribution.ts
crashlytics.ts
95:106 (15%)
348:359 (4%)
view
11 x 2 src/v2/providers/alerts
src/v2/providers
alerts.ts
pubsub.ts
82:92 (13%)
164:175 (9%)
view
11 x 2 src
src
cloud-functions.ts
cloud-functions.ts
580:590 (3%)
633:643 (3%)
view
10 x 2 integration_test/functions/src
integration_test/functions/src
auth-tests.ts
auth-tests.ts
16:27 (16%)
56:67 (16%)
view
10 x 2 src/providers
src/providers
database.ts
database.ts
223:232 (3%)
252:261 (3%)
view
9 x 2 src/v2/providers
src/v2/providers
storage.ts
storage.ts
326:334 (4%)
354:362 (4%)
view
9 x 2 integration_test/functions/src
integration_test/functions/src
auth-tests.ts
auth-tests.ts
29:41 (15%)
69:81 (15%)
view
9 x 2 src/v2/providers
src/v2/providers
pubsub.ts
pubsub.ts
149:157 (8%)
168:176 (8%)
view
9 x 2 src/v2/providers
src/v2/providers
pubsub.ts
storage.ts
134:145 (8%)
314:325 (4%)
view
9 x 2 scripts/publish
scripts/publish
cloudbuild.yaml
cloudbuild.yaml
10:20 (9%)
23:33 (9%)
view
9 x 2 scripts/publish
scripts/publish
cloudbuild.yaml
cloudbuild.yaml
10:20 (9%)
36:46 (9%)
view