angular / dev-infra
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
  • 3% duplication:
    • 9,872 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 335 duplicated lines
  • 31 duplicates
system3% (335 lines)
Duplication per Extension
ts2% (197 lines)
bzl4% (82 lines)
mjs12% (30 lines)
yml14% (18 lines)
js9% (8 lines)
Duplication per Component (primary)
ng-dev/release6% (122 lines)
bazel/browsers11% (58 lines)
ng-dev/pr3% (42 lines)
bazel/api-golden11% (24 lines)
ng-dev/format6% (21 lines)
ng-dev/utils1% (12 lines)
github-actions/commit-message-based-labels16% (9 lines)
tools/local-actions9% (9 lines)
ng-dev100% (8 lines)
shared-scripts/angular-linker9% (8 lines)
shared-scripts/angular-optimization13% (8 lines)
bazel/benchmark1% (7 lines)
bazel/spec-bundling3% (7 lines)
ng-dev/ngbot0% (0 lines)
ng-dev/ts-circular-dependencies0% (0 lines)
ng-dev/caretaker0% (0 lines)
ng-dev/commit-message0% (0 lines)
ng-dev/pullapprove0% (0 lines)
ng-dev/ci0% (0 lines)
ng-dev/misc0% (0 lines)
ROOT0% (0 lines)
github-actions0% (0 lines)
github-actions/feature-request0% (0 lines)
github-actions/lock-closed0% (0 lines)
github-actions/slash-commands0% (0 lines)
tools0% (0 lines)
tools/jasmine0% (0 lines)
tools/git-toolchain0% (0 lines)
bazel/http-server0% (0 lines)
bazel0% (0 lines)
bazel/integration0% (0 lines)
bazel/esbuild0% (0 lines)
tslint-rules0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 31 duplicates...
Size#FoldersFilesLinesCode
32 x 2 ng-dev/release/notes/templates
ng-dev/release/notes/templates
changelog.ts
github-release.ts
9:49 (57%)
9:49 (59%)
view
17 x 2 ng-dev/pr/common
ng-dev/pr/common
checkout-pr.ts
fetch-pull-request.ts
19:35 (28%)
73:89 (11%)
view
16 x 2 ng-dev/release/notes/templates
ng-dev/release/notes/templates
changelog.ts
github-release.ts
58:78 (28%)
56:76 (29%)
view
11 x 2 bazel/browsers
bazel/browsers
browser_archive_repo.bzl
browser_configure.bzl
85:95 (12%)
62:72 (16%)
view
9 x 2 github-actions/commit-message-based-labels
tools/local-actions/changelog
action.yml
action.yml
3:11 (81%)
3:11 (81%)
view
8 x 2 shared-scripts/angular-linker
shared-scripts/angular-optimization
mjs
esbuild-plugin.mjs
esbuild-plugin.mjs
1:9 (9%)
1:9 (13%)
view
8 x 2 ng-dev
ng-dev/pr/merge/strategies
cli.ts
commit-message-filter.js
1:8 (100%)
1:8 (23%)
view
7 x 2 bazel/benchmark/app_bundling
shared-scripts/angular-optimization
mjs
esbuild.config-tmpl.mjs
esbuild-plugin.mjs
1:7 (12%)
1:7 (12%)
view
7 x 2 ng-dev/release/publish/actions
ng-dev/release/publish/actions
cut-next-prerelease.ts
cut-release-candidate-for-feature-fre...
39:46 (17%)
30:37 (33%)
view
7 x 2 bazel/benchmark/app_bundling
shared-scripts/angular-linker
mjs
esbuild.config-tmpl.mjs
esbuild-plugin.mjs
1:7 (12%)
1:7 (8%)
view
7 x 2 ng-dev/format/formatters
ng-dev/format/formatters
buildifier.ts
prettier.ts
39:46 (23%)
46:53 (26%)
view
7 x 2 ng-dev/format/formatters
ng-dev/format/formatters
clang-format.ts
prettier.ts
37:44 (30%)
46:53 (26%)
view
7 x 2 ng-dev/format/formatters
ng-dev/format/formatters
buildifier.ts
clang-format.ts
39:46 (23%)
37:44 (30%)
view
7 x 2 bazel/benchmark/app_bundling
bazel/spec-bundling
mjs
esbuild.config-tmpl.mjs
esbuild.config-tmpl.mjs
1:7 (12%)
1:7 (21%)
view
7 x 2 bazel/spec-bundling
shared-scripts/angular-optimization
mjs
esbuild.config-tmpl.mjs
esbuild-plugin.mjs
1:7 (21%)
1:7 (12%)
view
7 x 2 bazel/spec-bundling
shared-scripts/angular-linker
mjs
esbuild.config-tmpl.mjs
esbuild-plugin.mjs
1:7 (21%)
1:7 (8%)
view
6 x 2 ng-dev/release/publish/actions
ng-dev/release/publish/actions
cut-new-patch.ts
cut-release-candidate-for-feature-fre...
33:39 (28%)
30:36 (28%)
view
6 x 2 ng-dev/release/publish/actions
ng-dev/release/publish/actions
cut-release-candidate-for-feature-fre...
cut-stable.ts
30:36 (28%)
37:43 (18%)
view
6 x 2 ng-dev/pr/common
ng-dev/pr/common
fetch-pull-request.ts
fetch-pull-request.ts
77:82 (4%)
84:89 (4%)
view
6 x 2 bazel/browsers/chromium
bazel/browsers/chromium
chromium.bzl
chromium.bzl
34:40 (5%)
48:54 (5%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
6 x 2 ng-dev/ngbot
ng-dev/pullapprove
cli.ts
cli.ts
12:18 
12:18 
view
6 x 2 ng-dev/release/info
ng-dev/release/build
cli.ts
cli.ts
32:38 
31:37 
view
6 x 2 ng-dev/release/stamping
ng-dev/release/stamping
env-stamp.ts
env-stamp.ts
104:110 
122:128 
view